summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/atomic.h18
-rw-r--r--include/features.h4
-rw-r--r--include/net/ppp_defs.h2
3 files changed, 14 insertions, 10 deletions
diff --git a/include/atomic.h b/include/atomic.h
index 267aff5d5..3adcfbc5f 100644
--- a/include/atomic.h
+++ b/include/atomic.h
@@ -54,15 +54,15 @@
and following args. */
#define __atomic_val_bysize(pre, post, mem, ...) \
({ \
- __typeof (*mem) __atg1_result; \
+ __typeof ((__typeof (*(mem))) *(mem)) __atg1_result; \
if (sizeof (*mem) == 1) \
- __atg1_result = pre##_8_##post (mem, __VA_ARGS__); \
+ __atg1_result = (__typeof ((__typeof (*(mem))) *(mem))) pre##_8_##post (mem, __VA_ARGS__); \
else if (sizeof (*mem) == 2) \
- __atg1_result = pre##_16_##post (mem, __VA_ARGS__); \
+ __atg1_result = (__typeof ((__typeof (*(mem))) *(mem))) pre##_16_##post (mem, __VA_ARGS__); \
else if (sizeof (*mem) == 4) \
- __atg1_result = pre##_32_##post (mem, __VA_ARGS__); \
+ __atg1_result = (__typeof ((__typeof (*(mem))) *(mem))) pre##_32_##post (mem, __VA_ARGS__); \
else if (sizeof (*mem) == 8) \
- __atg1_result = pre##_64_##post (mem, __VA_ARGS__); \
+ __atg1_result = (__typeof ((__typeof (*(mem))) *(mem))) pre##_64_##post (mem, __VA_ARGS__); \
else \
abort (); \
__atg1_result; \
@@ -71,13 +71,13 @@
({ \
int __atg2_result; \
if (sizeof (*mem) == 1) \
- __atg2_result = pre##_8_##post (mem, __VA_ARGS__); \
+ __atg2_result = (int) pre##_8_##post (mem, __VA_ARGS__); \
else if (sizeof (*mem) == 2) \
- __atg2_result = pre##_16_##post (mem, __VA_ARGS__); \
+ __atg2_result = (int) pre##_16_##post (mem, __VA_ARGS__); \
else if (sizeof (*mem) == 4) \
- __atg2_result = pre##_32_##post (mem, __VA_ARGS__); \
+ __atg2_result = (int) pre##_32_##post (mem, __VA_ARGS__); \
else if (sizeof (*mem) == 8) \
- __atg2_result = pre##_64_##post (mem, __VA_ARGS__); \
+ __atg2_result = (int) pre##_64_##post (mem, __VA_ARGS__); \
else \
abort (); \
__atg2_result; \
diff --git a/include/features.h b/include/features.h
index 11b34205f..b5d4e79f2 100644
--- a/include/features.h
+++ b/include/features.h
@@ -437,4 +437,8 @@
# include <libc-internal.h>
#endif
+#if defined(__UCLIBC_USE_TIME64__) || __TARGET_ARCH_BITS__ == 64
+#define __USE_TIME_BITS64 1
+#endif
+
#endif /* features.h */
diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h
index f8924c4f2..904d1933c 100644
--- a/include/net/ppp_defs.h
+++ b/include/net/ppp_defs.h
@@ -4,7 +4,7 @@
#define __need_time_t
#include <time.h>
-#include <asm/types.h>
+#include <sys/types.h>
#include <linux/ppp_defs.h>
#endif /* net/ppp_defs.h */