Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ BR_LINK = https://github.com/buildroot/buildroot/archive
BR_FILE = /tmp/buildroot-$(BR_VER).tar.gz
BR_CONF = $(TARGET)/openipc_defconfig
TARGET ?= $(PWD)/output
export CMAKE_POLICY_VERSION_MINIMUM := 3.5

CONFIG = $(error variable BOARD not defined)
TIMER := $(shell date +%s)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From: OpenIPC <dev@openipc.org>
Subject: [PATCH] Fix gnulib _GL_ATTRIBUTE_NODISCARD for GCC 15 / C23

GCC 15 defaults to C23 where __STDC_VERSION__ > 201710L, causing gnulib
to use [[__nodiscard__]] C23 attribute syntax. This syntax doesn't work
when placed between 'inline' and the return type in older gnulib code.

Fall back to __attribute__((warn_unused_result)) which works in all
positions.

--- a/lib/config.hin
+++ b/lib/config.hin
@@ -2586,7 +2586,7 @@
# define _GL_ATTRIBUTE_MALLOC
#endif

-#if 201710L < __STDC_VERSION__
+#if 0 && 201710L < __STDC_VERSION__
# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
#elif _GL_HAS_ATTRIBUTE (warn_unused_result)
# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
Loading