Swap getdtablesize() for sysconf(_SC_OPEN_MAX).
authorDan Albert <danalbert@google.com>
Mon, 16 Jun 2014 14:51:11 +0000 (14:51 +0000)
committerDan Albert <danalbert@google.com>
Mon, 16 Jun 2014 14:51:11 +0000 (14:51 +0000)
Bionic is no removing this as it was removed from POSIX 2004.

llvm-svn: 211027

compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc

index ca47e3c83d37492d8194544720ac2d250304a595..ddb9e1734223d1f4426e282d1cdc20160d040e94 100644 (file)
@@ -255,7 +255,7 @@ class SymbolizerProcess : public ExternalSymbolizerInterface {
       internal_close(outfd[1]);
       internal_close(infd[0]);
       internal_close(infd[1]);
-      for (int fd = getdtablesize(); fd > 2; fd--)
+      for (int fd = sysconf(_SC_OPEN_MAX); fd > 2; fd--)
         internal_close(fd);
       ExecuteWithDefaultArgs(path_);
       internal__exit(1);