Fix for 64bit time_t and no need for _XOPEN_SOURCE_EXTENDED

This commit is contained in:
ajacoutot 2022-11-07 17:43:47 +00:00
parent 2a69716178
commit 648bd04e86
2 changed files with 16 additions and 2 deletions

View File

@ -1,7 +1,7 @@
COMMENT= BBS terminal program
DISTNAME= syncterm-1.1
REVISION= 1
REVISION= 2
CATEGORIES= comms net
@ -29,7 +29,7 @@ MAKE_FLAGS= RELEASE=1 \
USE_SDL=1 \
SDL_CONFIG=${LOCALBASE}/bin/sdl2-config \
QUIET=
CFLAGS+= -DN_CURSES_LIB -D_XOPEN_SOURCE_EXTENDED=1
CFLAGS+= -DN_CURSES_LIB
CFLAGS+= ${PICFLAG}
.include <bsd.port.arch.mk>

View File

@ -0,0 +1,14 @@
64bit time_t
Index: src/xpdev/ini_file.c
--- src/xpdev/ini_file.c.orig
+++ src/xpdev/ini_file.c
@@ -707,7 +707,7 @@ char* iniSetDateTime(str_list_t* list, const char* sec
if(value==0)
SAFECOPY(str,"Never");
else if((p=ctime_r(&value,tstr))==NULL)
- SAFEPRINTF(str,"0x%lx",value);
+ SAFEPRINTF(str,"0x%llx",value);
else if(!include_time) /* reformat into "Mon DD YYYY" */
safe_snprintf(str,sizeof(str),"%.3s %.2s %.4s" ,p+4,p+8,p+20);
else /* reformat into "Mon DD YYYY HH:MM:SS" */