mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-12-05 14:31:49 +00:00
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:
1 parent
84ffab7158
commit
f4f515d212
4 files changed
+38
-28
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user