[diff] remove archaic #ifdef

View: New views
1 Messages — Rating Filter:   Alert me  

[diff] remove archaic #ifdef

by Aleksej Saushev-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

  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...