tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[diff] remove archaic #ifdef



  Hello!

I propose the following cleanup: in my opinion it makes code a bit
cleaner, we don't need to carry such an old garbage anyway.

Index: sbin/ping/ping.c
===================================================================
RCS file: /cvsroot/src/sbin/ping/ping.c,v
retrieving revision 1.89
diff -u -r1.89 ping.c
--- sbin/ping/ping.c    11 Apr 2009 06:49:50 -0000      1.89
+++ sbin/ping/ping.c    1 Nov 2009 23:49:58 -0000
@@ -78,18 +78,6 @@
 #include <math.h>
 #include <string.h>
 #include <err.h>
-#ifdef sgi
-#include <bstring.h>
-#include <getopt.h>
-#include <sys/prctl.h>
-#ifndef PRE_KUDZU
-#include <cap_net.h>
-#else
-#define cap_socket socket
-#endif
-#else
-#define cap_socket socket
-#endif
 
 #include <netinet/in_systm.h>
 #include <netinet/in.h>
@@ -256,9 +244,9 @@
        struct sigaction sa;
 #endif
 
-       if ((s = cap_socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) < 0)
+       if ((s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) < 0)
                err(1, "Cannot create socket");
-       if ((sloop = cap_socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) < 0)
+       if ((sloop = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) < 0)
                err(1, "Cannot create socket");
 
        /*


-- 
HE CE3OH...



Home | Main Index | Thread Index | Old Index