pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/59764: security/gcr builds fails due implicit declaration of function 'timegm' on NetBSD/amd64 11.99.3 (maybe gcc14 related)



>Number:         59764
>Category:       pkg
>Synopsis:       security/gcr builds fails due implicit declaration of function 'timegm' on NetBSD/amd64 11.99.3 (maybe gcc14 related)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 16 10:10:00 +0000 2025
>Originator:     Leonardo Taccari
>Release:        NetBSD 11.99.3
>Organization:
The NetBSD Foundation
>Environment:
System: NetBSD boh 11.99.3 NetBSD 11.99.3 (GENERIC) #0: Tue Oct 14 19:59:20 CEST 2025 leot@abacus:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	When building security/gcr on NetBSD/amd64 11.99.3 with base gcc 14.3.0
	the build fails with:

	../gck/gck-slot.c:610:48: error: implicit declaration of function 'timegm'; did you mean 'time'? [-Wimplicit-function-declaration]
	  610 |                         token_info->utc_time = timegm (&tm);
	      |                                                ^~~~~~
	      |                                                time
>How-To-Repeat:
	$ cd pkgsrc/security/gcr
	$ make
>Fix:
	Adding `CFLAGS+= -Wno-implicit-function-declaration` (or CFLAGS.NetBSD)
	workaround that but I'm not sure if that's the right solution.
	(According a grep I believe that devel/libsmi does that and it was the
	only example that I was able to find)

	gck-slot.c includes <time.h> but there are some #ifdef for timegm(3)
	that I believe do not expose it by default.

	Is there any better solution instead of passing
	`-Wno-implicit-function-declaration`?



Home | Main Index | Thread Index | Old Index