Skip to contentSkip to conversation

package/execline: fix uclibc build

PATCH Applied Fabrice Fontaine 2 participants 2 messages Jun 15, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/execline: fix uclibc build

Fix the following uclibc build failure raised since bump to version 2.9.5.1 in commit 42fad03182ed53de8003b66d50e893f42b72145e and
https://github.com/skarnet/execline/commit/6dfe54be869c117676dcc004400ac68096945531:

src/execline/eltest.c: In function 'eltest_run':
src/execline/eltest.c:366:31: error: 'struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'?

  366 |       return timespec_cmp(&st.st_mtim, &st.st_atim) > 0 ;
      |                               ^~~~~~~
      |                               st_mtime
Fixes 42fad03182ed53de8003b66d50e893f42b72145e

- http://autobuild.buildroot.org/results/64bf2928f36e07332052854cbaaa7a6f8f347e29

---
 package/execline/execline.mk | 1 +
 1 file changed, 1 insertion(+)
package/execline/execline.mk +1 -0
index 842ded6b88..b3d2d98216 100644
@@ -12,6 +12,7 @@ EXECLINE_INSTALL_STAGING = YES
 EXECLINE_DEPENDENCIES = skalibs
 
 EXECLINE_CONF_OPTS = \
+	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
 	--prefix=/ \
 	--with-sysdeps=$(STAGING_DIR)/lib/skalibs/sysdeps \
 	--with-include=$(STAGING_DIR)/include \
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Fabrice, All,

On 2024-06-15 09:56 +0200, Fabrice Fontaine spake thusly:

Quoted 23 lines

Fix the following uclibc build failure raised since bump to version 2.9.5.1 in commit 42fad03182ed53de8003b66d50e893f42b72145e and
https://github.com/skarnet/execline/commit/6dfe54be869c117676dcc004400ac68096945531:

src/execline/eltest.c: In function 'eltest_run':
src/execline/eltest.c:366:31: error: 'struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'?

  366 |       return timespec_cmp(&st.st_mtim, &st.st_atim) > 0 ;
      |                               ^~~~~~~
      |                               st_mtime
Fixes 42fad03182ed53de8003b66d50e893f42b72145e

- http://autobuild.buildroot.org/results/64bf2928f36e07332052854cbaaa7a6f8f347e29

---
 package/execline/execline.mk | 1 +
 1 file changed, 1 insertion(+)
package/execline/execline.mk +0 -0
index 842ded6b88..b3d2d98216 100644

package/execline/execline.mk EXECLINE_INSTALL_STAGING = YES · line 15

Quoted 4 lines
package/execline/execline.mk +1 -0
@@ -12,6 +12,7 @@ EXECLINE_INSTALL_STAGING = YES
 EXECLINE_DEPENDENCIES = skalibs
 
 EXECLINE_CONF_OPTS = \
+	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
    $ man 3type stat
    [...] glibc exposes the nanosecond component names if
    _POSIX_C_SOURCE is defined with the value 200809L or
    greater, or _XOPEN_SOURCE is defined with the value 700
    or greater.

In uClibc-ng, they are guarded by __USE_MISC, which is defined by _BSD_SOURCE || _SVID_SOURCE, which are each stated to be equivalent to defining _POSIX_C_SOURCE to 200809L or greater.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 10 lines
package/execline/execline.mk +0 -0
 	--prefix=/ \
 	--with-sysdeps=$(STAGING_DIR)/lib/skalibs/sysdeps \
 	--with-include=$(STAGING_DIR)/include \
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot