fix lua tmpname() vs mkstemp() on linux
Avoid the warning that tmpname should be replaced by mkstemp by replacing tmpname with mkstemp. lua has code to do that but it isn't trivial to activate while leaving the lua distribution unmodified. [I've no idea whether nethack's usage even results in liblua ever creating any temporary files.] Using nethack's hints to pass -DLUA_USE_POSIX from top Makefile to lib/lua-$(LUA_VERSION)/Makefile has been tested, building liblua.a on linux with that has not.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# NetHack 3.6 linux-x11 $NHDT-Date: 1566346602 2019/08/21 00:16:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.24 $
|
||||
# NetHack 3.6 linux-x11 $NHDT-Date: 1589828480 2020/05/18 19:01:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.25 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
@@ -27,6 +27,11 @@ CFLAGS+=-DX11_GRAPHICS -DDEFAULT_WINDOW_SYS=\"X11\" -DNOTTYGRAPHICS
|
||||
CFLAGS+=-DDUMPLOG
|
||||
CFLAGS+=-DCONFIG_ERROR_SECURE=FALSE
|
||||
|
||||
# when building liblua.a, avoid warning that use of tmpnam() should be
|
||||
# replaced by mkstemp(); the lua code doesn't use nethack's config.h so
|
||||
# this needs to be passed via make rather than defined in unixconf.h
|
||||
SYSCFLAGS=-DLUA_USE_POSIX
|
||||
|
||||
LINK=$(CC)
|
||||
|
||||
WINSRC = $(WINX11SRC)
|
||||
|
||||
Reference in New Issue
Block a user