summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-01-15 18:23:43 -0800
committerGuy Harris <guy@alum.mit.edu>2011-01-15 18:24:56 -0800
commit7604166f10c3e4b429e49c8d900c2eae2bd8a704 (patch)
tree679c317dad62a05df806f3022876532cc1156329
parent3a18a3f447fa4efb5ec090f0b605abf17691bf94 (diff)
downloadlibpcap-7604166f10c3e4b429e49c8d900c2eae2bd8a704.tar.gz
Fix build error on HP-UX.
-rw-r--r--pcap-dlpi.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/pcap-dlpi.c b/pcap-dlpi.c
index f7eb5072..78bb4511 100644
--- a/pcap-dlpi.c
+++ b/pcap-dlpi.c
@@ -633,14 +633,16 @@ pcap_activate_dlpi(pcap_t *p)
** under SINIX) (Not necessary on send FD)
*/
#ifndef sinix
- if (
-#ifdef __hpux
- !p->opt.promisc &&
-#endif
-#ifdef HAVE_SOLARIS
- !isatm
+#if defined(__hpux)
+ /* HP-UX - only do this when not in promiscuous mode */
+ if (!p->opt.promisc) {
+#elif defined(HAVE_SOLARIS)
+ /* Solaris - don't do this on SunATM devices */
+ if (!isatm) {
+#else
+ /* Everything else (except for SINIX) - always do this */
+ {
#endif
- ) {
status = dlpromiscon(p, DL_PROMISC_SAP);
if (status < 0) {
/*