]> git.sesse.net Git - vlc/blobdiff - bin/rootwrap.c
access: archive: remove dead initialization
[vlc] / bin / rootwrap.c
index e95784c9dc3dc5604ae2e21497efe5bea894c903..37d88396faf55c5ec62db1bd187a5a0b8fe488b3 100644 (file)
@@ -18,7 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 #define _XPG4_2 /* ancilliary data on Solaris */
@@ -34,7 +34,9 @@
 #include <sys/socket.h>
 #include <sys/uio.h>
 #include <sys/resource.h> /* getrlimit() */
+#ifdef RLIMIT_RTPRIO
 #include <sched.h>
+#endif
 #include <errno.h>
 #include <netinet/in.h>
 
@@ -170,6 +172,7 @@ static void rootprocess (int fd)
                 close (sock);
                 continue;
             }
+            close (sock);
         }
         send_err (fd, errno);
     }