use $(LIBENSCVECTOR) instead of libensc_vector.a
[util-vserver.git] / util-vserver / src / listdevip.c
index b854495..abcbe7c 100644 (file)
        Print the list of all network (IP) devices. Print the IP
        in fact, including all aliases.
 */
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+#include "compat.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -47,7 +52,7 @@ static int devlist_read2_2()
        int ret = -1;
        int skfd = socket (AF_INET,SOCK_DGRAM,0);
        if (skfd < 0) {
-               perror ("socket");
+               perror ("listdevip: socket()");
        }else{
                struct ifconf ifc;
                int numreqs = 30;
@@ -58,7 +63,7 @@ static int devlist_read2_2()
                        ifc.ifc_buf = (char*)realloc(ifc.ifc_buf, ifc.ifc_len);
 
                        if (ioctl(skfd, SIOCGIFCONF, &ifc) < 0) {
-                               perror("SIOCGIFCONF");
+                               perror("listdevip: SIOCGIFCONF");
                                ret = -1;
                                break;
                        }
@@ -99,7 +104,7 @@ static int devlist_read2_2()
        return ret;
 }
 
-int main (int argc, char *argv[])
+int main (int UNUSED argc, char UNUSED *argv[])
 {
        devlist_read2_2();
        return 0;