Code

check_capability: explicitly target recent linux implementations
[collectd.git] / src / ping.c
index 9b5d5ca581a04b6e43820992545efedf2cad759f..7b28ed37d0c409733b22df09a51e587149f4068d 100644 (file)
@@ -452,7 +452,7 @@ static int ping_init (void) /* {{{ */
         "Will use a timeout of %gs.", ping_timeout);
   }
 
-#ifdef HAVE_SYS_CAPABILITY_H
+#if defined(HAVE_SYS_CAPABILITY_H) && defined(CAP_NET_RAW)
   if (check_capability (CAP_NET_RAW) != 0)
   {
     if (getuid () == 0)