[50/52] nss: Use LFS and 64 bit time_t for installed programs

Message ID 20210305201518.798584-51-adhemerval.zanella@linaro.org
State Superseded
Headers
Series Add 64 bit time support on legacy ABIs |

Commit Message

Adhemerval Zanella Netto March 5, 2021, 8:15 p.m. UTC
  It is enabled for getend and makedb.
---
 nss/Makefile | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
  

Patch

diff --git a/nss/Makefile b/nss/Makefile
index 0906202db9..eb1b604b0c 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -45,7 +45,8 @@  have-sunrpc		:= 1
 else
 have-sunrpc		:= 0
 endif
-CPPFLAGS-getent.c	= -DHAVE_SUNRPC=$(have-sunrpc)
+CPPFLAGS-getent.c	= -DHAVE_SUNRPC=$(have-sunrpc) \
+			  -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64
 
 others                  := getent makedb
 install-bin             := getent makedb
@@ -148,6 +149,14 @@  $(libnss_db-dbs:%=$(objpfx)%.c): $(objpfx)db-%.c: nss_files/files-%.c
 
 
 $(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
+include $(o-iterator)
+define o-iterator-doit
+$(foreach f,$(makedb-modules),$(objpfx)$(f)$(o)): CFLAGS += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64
+endef
+object-suffixes-left := $(all-object-suffixes)
+include $(o-iterator)
+
+
 
 $(inst_vardbdir)/Makefile: db-Makefile $(+force)
 	$(do-install)