aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/posix')
-rw-r--r--src/platform/posix/posix_config.h4
-rw-r--r--src/platform/posix/posix_pollq.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/platform/posix/posix_config.h b/src/platform/posix/posix_config.h
index d2a5eb90..1fe4d1a9 100644
--- a/src/platform/posix/posix_config.h
+++ b/src/platform/posix/posix_config.h
@@ -42,6 +42,8 @@
#include <time.h>
+#ifdef PLATFORM_POSIX
+
// It should never hurt to use DEVURANDOM, since if the device does not
// exist then we won't open it. (Provided: it would be bad if the device
// exists but has somehow very very different semantics. We don't know
@@ -60,3 +62,5 @@
#define NNG_USE_POSIX_POLLQ_POLL 1
#define NNG_USE_POSIX_RESOLV_GAI 1
+
+#endif // PLATFORM_POSIX \ No newline at end of file
diff --git a/src/platform/posix/posix_pollq.h b/src/platform/posix/posix_pollq.h
index 74b39704..a04d1ef2 100644
--- a/src/platform/posix/posix_pollq.h
+++ b/src/platform/posix/posix_pollq.h
@@ -10,6 +10,8 @@
#ifndef PLATFORM_POSIX_POLLQ_H
#define PLATFORM_POSIX_POLLQ_H
+#ifdef PLATFORM_POSIX
+
// This file defines structures we will use for emulating asynchronous I/O
// on POSIX. POSIX lacks the support for callback based asynchronous I/O
// that we have on Windows, although it has a non-widely support aio layer
@@ -40,4 +42,6 @@ extern void nni_posix_pollq_cancel(nni_posix_pollq *, nni_posix_pollq_node *);
extern int nni_posix_pollq_sysinit(void);
extern void nni_posix_pollq_sysfini(void);
+#endif // PLATFORM_POSIX
+
#endif // PLATFORM_POSIX_POLLQ_H