1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

Replace getdtablesize() with sysconf(_SC_OPEN_MAX)

From the getdtablesize(3) man page:
       It is not specified in POSIX.1; portable applications should
       employ sysconf(_SC_OPEN_MAX) instead of this call.

Specifically, this fixes a compilation problem on Android.
This commit is contained in:
Fredrik Fornwall
2018-03-18 21:15:12 +01:00
parent 5e3b6d50bb
commit b29352eff6
+1 -1
View File
@@ -72,7 +72,7 @@ daemonize ()
setsid ();
/* close all file descriptors */
for (i = getdtablesize(); i >= 0; --i)
for (i = sysconf(_SC_OPEN_MAX); i >= 0; --i)
{
close (i);
}