The STATIC_ASSERT macro declares an external function (which is never used).
The declaratin fails if the expression evaluates to false, because that
would result in a negative array bound.
#define PIDFILE "/var/run/pvefw-logger.pid"
#define LQ_LEN 512
-#define LE_MAX (512 - 16) // try to fit into 512 bytes
+#define LE_MAX (512 - 4) // try to fit into 512 bytes
#define MAX_CHAIN_LEN 28
char buf[LE_MAX];
};
+#define STATIC_ASSERT(cond) \
+ extern void pve_static_assert(int test[(cond) ? 1 : -1])
+
+STATIC_ASSERT(sizeof(struct log_entry) == 512);
+
int outfd = -1;
gboolean terminate_threads = FALSE;