Skip to contentSkip to conversation

9pfsd: allow building with old glibc

PATCH In review Jan Beulich 3 participants 3 messages Mar 5, 2024 – Mar 6, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 9pfsd: allow building with old glibc

Neither pread() / pwrite() nor O_DIRECTORY are available from glibc 2.11.3 headers without defining (e.g.) _GNU_SOURCE. Supplying the definition unconditionally shouldn't be a problem, seeing that various other tools/ components do so, too.

tools/9pfsd/Makefile +1 -1
@@ -5,7 +5,7 @@
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CFLAGS += $(PTHREAD_CFLAGS)
+CFLAGS += $(PTHREAD_CFLAGS) -D_GNU_SOURCE
 LDFLAGS += $(PTHREAD_LDFLAGS)
 
 TARGETS := xen-9pfsd
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jan Beulich

Neither pread() / pwrite() nor O_DIRECTORY are available from glibc 2.11.3 headers without defining (e.g.) _GNU_SOURCE. Supplying the definition unconditionally shouldn't be a problem, seeing that various other tools/ components do so, too.

Fine with me.

Juergen

#2 lore raw
Quoted 11 lines · Jürgen Groß
Quoted 6 lines · Jan Beulich

Neither pread() / pwrite() nor O_DIRECTORY are available from glibc 2.11.3 headers without defining (e.g.) _GNU_SOURCE. Supplying the definition unconditionally shouldn't be a problem, seeing that various other tools/ components do so, too.

Fine with me.

Thanks,

Signature · 1 line
Anthony PERARD