aboutsummaryrefslogtreecommitdiff
path: root/portability.h
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2021-03-31 22:41:40 +0100
committerDenis Ovsienko <denis@ovsienko.info>2021-03-31 22:45:00 +0100
commit84c5f4cf185e17a62ea5afe88c2a79baf06b977b (patch)
tree41642fc2897b3a25c23f52141a07a4b7d15beab7 /portability.h
parent127da7e4672edae04b1555eb84237c6e111867e0 (diff)
Get the previous commit right.
timeradd() and timersub() exist only as macros, hence do not test for *functions* with these names, as the test always fails. Test for the macros instead and omit the HAVE_ props.
Diffstat (limited to 'portability.h')
-rw-r--r--portability.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/portability.h b/portability.h
index 3acc9ba2..84d0778a 100644
--- a/portability.h
+++ b/portability.h
@@ -113,7 +113,7 @@ extern int pcap_vasprintf(char **, const char *, va_list ap);
#endif
/* For Solaris before 11. */
-#ifndef HAVE_TIMERADD
+#ifndef timeradd
#define timeradd(a, b, result) \
do { \
(result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
@@ -123,8 +123,8 @@ extern int pcap_vasprintf(char **, const char *, va_list ap);
(result)->tv_usec -= 1000000; \
} \
} while (0)
-#endif /* HAVE_TIMERADD */
-#ifndef HAVE_TIMERSUB
+#endif /* timeradd */
+#ifndef timersub
#define timersub(a, b, result) \
do { \
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
@@ -134,7 +134,7 @@ extern int pcap_vasprintf(char **, const char *, va_list ap);
(result)->tv_usec += 1000000; \
} \
} while (0)
-#endif /* HAVE_TIMERSUB */
+#endif /* timersub */
#ifdef HAVE_STRTOK_R
#define pcap_strtok_r strtok_r