Bug 1220470 - GCC 14: efitools package fails
Summary: GCC 14: efitools package fails
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Bootloader (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Gary Ching-Pang Lin
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: modern_C
  Show dependency treegraph
 
Reported: 2024-02-27 15:06 UTC by Michal Jireš
Modified: 2024-03-08 06:42 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Jireš 2024-02-27 15:06:05 UTC
Building efitools with GCC 14 fails here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/efitools/standard/x86_64

Due to:

sign-efi-sig-list.c: In function ‘main’:
sign-efi-sig-list.c:166:17: error: implicit declaration of function ‘strptime’; did you mean ‘strftime’? [-Wimplicit-function-declaration]
  166 |                 strptime(timestampstr, "%Y-%m-%d %H:%M:%S", &tms);
      |                 ^~~~~~~~
      |                 strftime

flash-var.c: In function ‘main’:
flash-var.c:109:17: error: implicit declaration of function ‘strptime’; did you mean ‘strftime’? [-Wimplicit-function-declaration]
  109 |                 strptime(timestampstr, "%Y-%m-%d %H:%M:%S", &tms);
      |                 ^~~~~~~~
      |                 strftime


Builds with:

Index: efitools.spec_dir/efitools-1.9.2/sign-efi-sig-list.c
===================================================================
--- efitools.spec_dir.orig/efitools-1.9.2/sign-efi-sig-list.c
+++ efitools.spec_dir/efitools-1.9.2/sign-efi-sig-list.c
@@ -3,6 +3,7 @@
  *
  * see COPYING file
  */
+#define _XOPEN_SOURCE
 #include <stdint.h>
 #define __STDC_VERSION__ 199901L
 #include <efi.h>
Index: efitools.spec_dir/efitools-1.9.2/flash-var.c
===================================================================
--- efitools.spec_dir.orig/efitools-1.9.2/flash-var.c
+++ efitools.spec_dir/efitools-1.9.2/flash-var.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE
 #include <stdlib.h>
 #include <stdint.h>
 #include <sys/types.h>
Comment 1 Gary Ching-Pang Lin 2024-03-08 06:42:28 UTC
Fixed with sr#1156254