]> git.sesse.net Git - vlc/commitdiff
Fix nissing include and atoi() invocation
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 22 Jun 2008 16:42:55 +0000 (19:42 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 22 Jun 2008 16:46:58 +0000 (19:46 +0300)
src/network/rootbind.c

index c6546d4c421335a9afd71d3664c2550ef171a402..983c6576ad1116ee7304f2953b01919ae370a7e3 100644 (file)
@@ -35,6 +35,7 @@ int rootwrap_bind (int, int, int, const struct sockaddr *, size_t);
 #ifdef ENABLE_ROOTWRAP
 
 #include <string.h>
+#include <stdlib.h>
 
 #include <sys/types.h>
 #include <unistd.h>
@@ -97,7 +98,7 @@ int rootwrap_bind (int family, int socktype, int protocol,
 
     const char *sockenv = getenv ("VLC_ROOTWRAP_SOCK");
     if (sockenv != NULL)
-        sock = atoi (sock);
+        sock = atoi (sockenv);
     if (sock == -1)
     {
         errno = EACCES;