Merge commit 'v2.5.1'
[ossec-hids.git] / src / analysisd / cdb / uint32_pack.c
diff --git a/src/analysisd/cdb/uint32_pack.c b/src/analysisd/cdb/uint32_pack.c
new file mode 100644 (file)
index 0000000..fd2641e
--- /dev/null
@@ -0,0 +1,11 @@
+#define NO_UINT32_MACROS
+#include "uint32.h"
+
+/* adopted from libowfat 0.9 (GPL) */
+
+void uint32_pack(char *out,uint32 in) {
+  *out=in&0xff; in>>=8;
+  *++out=in&0xff; in>>=8;
+  *++out=in&0xff; in>>=8;
+  *++out=in&0xff;
+}