[PATCH] Fix mq_{send,receive,timedreceive} for non-ADVANCED_REALTIME
Steven J. Magnani
steve at digidescorp.com
Tue Dec 28 16:00:21 UTC 2010
Disable compilation of librt files that depend on ADVANCED_REALTIME.
On microblaze, which does not have ADVANCED_REALTIME, 0.9.32-rc1 builds fail with
librt/mq_receive.c:9:2: warning: #warning FIXME: hard dependency on ADVANCED REALTIME feature
librt/mq_receive.c:11: error: 'mq_timedreceive' undeclared here (not in a function)
librt/mq_receive.c:11: warning: type defaults to 'int' in declaration of 'mq_timedreceive'
librt/mq_receive.c:28: warning: no previous prototype for 'mq_timedreceive'
librt/mq_receive.c:28: error: 'mq_timedreceive' redeclared as different kind of symbol
librt/mq_receive.c:11: error: previous declaration of 'mq_timedreceive' was here
Signed-off-by: Steven J. Magnani <steve at digidescorp.com>
---
diff -uprN /tmp/a/librt/Makefile.in /tmp/b/librt/Makefile.in
--- /tmp/a/librt/Makefile.in 2010-12-28 07:40:33.385134102 -0600
+++ /tmp/b/librt/Makefile.in 2010-12-28 07:55:43.325706796 -0600
@@ -22,15 +22,27 @@ librt_OUT := $(top_builddir)librt
ifeq ($(UCLIBC_HAS_REALTIME),y)
ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
+ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
librt_CSRC := $(filter-out mq_notify.c timer_create.c timer_delete.c \
timer_getoverr.c timer_gettime.c timer_settime.c, \
$(notdir $(wildcard $(librt_DIR)/*.c)))
+else
+librt_CSRC := $(filter-out mq_notify.c timer_create.c timer_delete.c \
+ timer_getoverr.c timer_gettime.c timer_settime.c mq_send.c mq_receive.c, \
+ $(notdir $(wildcard $(librt_DIR)/*.c)))
+endif
librt_SSRC := $(wildcard $(librt_DIR)/*.S)
librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_CSRC))
librt_OBJ += $(patsubst $(librt_DIR)/%.S,$(librt_OUT)/%.o,$(librt_SSRC))
else
+ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
librt_SRC := $(filter-out clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c, \
$(notdir $(wildcard $(librt_DIR)/*.c)))
+else
+librt_SRC := $(filter-out clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c \
+ mq_send.c mq_receive.c, \
+ $(notdir $(wildcard $(librt_DIR)/*.c)))
+endif
librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC))
endif
More information about the uClibc
mailing list