]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix build error on HP-UX.
authorGuy Harris <[email protected]>
Sun, 16 Jan 2011 02:23:43 +0000 (18:23 -0800)
committerGuy Harris <[email protected]>
Sun, 16 Jan 2011 02:23:43 +0000 (18:23 -0800)
pcap-dlpi.c

index f7eb507280168d0353cc00f52dac4f2a3ace1ea0..78bb45118330d8486d4907477c53c0608fb1ceac 100644 (file)
@@ -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) {
                        /*