Skip to content

Commit

Permalink
Add -D_POSIX_C_SOURCE to automake cflags.
Browse files Browse the repository at this point in the history
Needed for localtime_r on msys2
See msys2/MINGW-packages#1342
  • Loading branch information
masoudd committed Jun 14, 2024
1 parent 06d4d05 commit 11a977b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sources/libjalali/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ includedir= $(prefix)/include/jalali
include_HEADERS = jalali.h jtime.h jconfig.h
INCLUDES = -I. -I@includedir@
LIBS = @LIBS@ $(THREAD_LIBS)
AM_CFLAGS = @CFLAGS@ -D_REENTRANT -W -Wall -O2
AM_CFLAGS = @CFLAGS@ -D_REENTRANT -W -Wall -O2 -D_POSIX_C_SOURCE
2 changes: 1 addition & 1 deletion sources/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ bin_PROGRAMS = jcal jdate
INCLUDES = -I. -I.. -I../libjalali -I@includedir@

AM_CFLAGS = @CFLAGS@ -fno-inline -D_REENTRANT -Wall\
-O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE

jcal_SOURCES = jcal.c
jdate_SOURCES = jdate.c
Expand Down

0 comments on commit 11a977b

Please # to comment.