diff options
author | Fredrik Fornwall <fredrik@fornwall.net> | 2018-03-18 21:15:12 +0100 |
---|---|---|
committer | Fredrik Fornwall <fredrik@fornwall.net> | 2018-03-18 21:15:12 +0100 |
commit | b29352eff64bd476b754284cea4fd794cdfc6f71 (patch) | |
tree | 7a32e76a15af10ed5f74967a03d6af9638cb834c /src/gui | |
parent | 5e3b6d50bb3cae576e00e018eebfada891c3597b (diff) | |
download | weechat-b29352eff64bd476b754284cea4fd794cdfc6f71.zip |
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.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/headless/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/curses/headless/main.c b/src/gui/curses/headless/main.c index b19a3ffc7..871a4a30d 100644 --- a/src/gui/curses/headless/main.c +++ b/src/gui/curses/headless/main.c @@ -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); } |