# error "Undefined or unknown BYTE_ORDER"
#endif
+#ifdef _MSC_VER
+# define RSPAMD_PACKED(name) \
+ __pragma(pack(push, 1)) struct name __pragma(pack(pop))
+#elif defined(__GNUC__)
+# define RSPAMD_PACKED(name) struct __attribute__((packed)) name
+#else
+# define RSPAMD_PACKED(name)
+#endif
#cmakedefine HAVE_SYS_QUEUE_H 1
u_char hash[FUZZY_HASHLEN];
};
-struct rspamd_fuzzy_cmd {
+RSPAMD_PACKED(rspamd_fuzzy_cmd) {
guint8 version;
guint8 cmd;
guint8 shingles_count;
guint8 flag;
gint32 value;
+ guint32 tag;
gchar digest[64];
};
-struct rspamd_fuzzy_shingle_cmd {
+RSPAMD_PACKED(rspamd_fuzzy_shingle_cmd) {
struct rspamd_fuzzy_cmd basic;
struct rspamd_shingle sgl;
};
-struct rspamd_fuzzy_reply {
+RSPAMD_PACKED(rspamd_fuzzy_reply) {
guint32 value;
guint32 flag;
- gdouble prob;
+ guint32 tag;
+ float prob;
};
#endif