Move OS defines to nmrpd.h
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Tue, 2 Feb 2016 10:14:28 +0000 (12:14 +0200)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Tue, 2 Feb 2016 10:14:28 +0000 (12:14 +0200)
ethsock.c
nmrpd.h

index 65f1b6161587374307befc80d86980110dd75ed4..ab15089e798dec3558675f4632db537a5780eda5 100644 (file)
--- a/ethsock.c
+++ b/ethsock.c
@@ -5,17 +5,7 @@
 #include <stdio.h>
 #include <pcap.h>
 #include "ethsock.h"
-
-#if defined(_WIN32) || defined(_WIN64)
-#define NMRPFLASH_WINDOWS
-#elif defined(__linux__)
-#define NMRPFLASH_LINUX
-#elif defined(__APPLE__) && defined(__MACH__)
-#define NMRPFLASH_OSX
-#elif defined(__unix__)
-#define NMRPFLASH_UNIX
-#warning "nmrp-flash is not fully supported on your operating system"
-#endif
+#include "nmrpd.h"
 
 #if defined(NMRPFLASH_WINDOWS)
 #include <winsock2.h>
diff --git a/nmrpd.h b/nmrpd.h
index b6287dc8be19c36ebda4e44bc4fa14a09f98d82b..374448dda93a36adae47ac13285590b37a9b366e 100644 (file)
--- a/nmrpd.h
+++ b/nmrpd.h
 #include <stdint.h>
 #include <stdbool.h>
 
+#if defined(_WIN32) || defined(_WIN64)
+#define NMRPFLASH_WINDOWS
+#elif defined(__linux__)
+#define NMRPFLASH_LINUX
+#elif defined(__APPLE__) && defined(__MACH__)
+#define NMRPFLASH_OSX
+#elif defined(__unix__)
+#define NMRPFLASH_UNIX
+#warning "nmrp-flash is not fully supported on your operating system"
+#endif
+
 #define NMRPD_VERSION "0.9"
 
 enum nmrp_op {