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.
The optional command line option "--daemon" runs WeeChat like a daemon (fork, new process group, file descriptors closed).