Skip to content

Commit 9a479e2

Browse files
committed
Update POSIX feature definition in chatbot.c to enable GNU extensions
1 parent f0d30fc commit 9a479e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

c/src/chatbot.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
// Enable POSIX functions (strdup, strncasecmp, etc.)
2-
#define _POSIX_C_SOURCE 200809L
1+
// Enable POSIX/GNU extensions (strdup, strncasecmp, etc.)
2+
// _GNU_SOURCE is needed because -std=c17 disables extensions by default
3+
#define _GNU_SOURCE
34

45
#include <stdlib.h>
56
#include <stdio.h>

0 commit comments

Comments
 (0)