Fix building on Chimera Linux (and other similar operating systems)

zoitechat references kill, popen, pclose, gmtime_r, and localtime_r
which are POSIX-only functions that need #define _POSIX_SOURCE to
build with LLVM or musl C, one of the two.
This commit is contained in:
Gourd committed 2026-12-04 22:16:32 -05:00
1 parent 84ffab7158
commit f4f515d212
4 files changed
+38 -28

No files matched your search

+2 -1
View File
@@ -14,6 +14,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -25,7 +26,7 @@ int xs_parse_df(gint64 *out_total, gint64 *out_free)
{
FILE *pipe;
char buffer[bsize];
pipe = popen("df -k -l -P --exclude-type=squashfs --exclude-type=devtmpfs --exclude-type=tmpfs", "r");
if(pipe==NULL)
return 1;