Hi,
yesterday I released uClibc-ng 1.0.46.
The most important change is time64 support for a lot of
32 Bit architectures like ARM, MIPS, PPC32, ...
Thanks a lot Dmitry for all of your patches and hard work.
Furthermore riscv32 with MMU can now be used.
best regards
Waldemar
Hello there!
I am having a bit of a "moment" here, trying to build ucLibC on my VisionFive2. I have configured most of the things I would like the library to feature, but when I try to actually build it, it can not find my headers properly.
I have tried /usr, /usr/include and also used find to locate the folders that it was looking for, but to no avail. It is either linux/errno.h, asm/errno.h or asm/unistd.h that can not be found.
The kernel is self-built (since the upstream currently lacks two patches required for full SoC support) off the 6.6.0 branch and headers are installed to their standard location, including /usr/src/linux-headers-$(uname -r).
What is the expected structure to be found under .config's KERNEL_HEADERS?
Thank you and kind regards,
Ingwie
Previously the common definition of this structure was broken by a mistake.
Restore it correctly for all needed architectures and all use cases.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh(a)gmail.com>
---
libc/sysdeps/linux/common/bits/sem.h | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/libc/sysdeps/linux/common/bits/sem.h b/libc/sysdeps/linux/common/bits/sem.h
index 06a256259..1c0836c6d 100644
--- a/libc/sysdeps/linux/common/bits/sem.h
+++ b/libc/sysdeps/linux/common/bits/sem.h
@@ -39,22 +39,33 @@
struct semid_ds
{
struct ipc_perm sem_perm; /* operation permission struct */
-
+#if defined(__UCLIBC_USE_TIME64__)
unsigned long int __sem_otime_internal_1;
unsigned long int __sem_otime_internal_2;
+#else
+ __time_t sem_otime; /* last semop() time */
+#endif
+#if (__WORDSIZE == 32 && !defined(__arm__) && !defined(__or1k__) && !defined(__xtensa__)) || \
+ ((defined(__arm__) || defined(__or1k__) || defined(__xtensa__)) && !defined(__UCLIBC_USE_TIME64__))
+ unsigned long int __uclibc_unused1;
+#endif
+#if defined(__UCLIBC_USE_TIME64__)
unsigned long int __sem_ctime_internal_1;
unsigned long int __sem_ctime_internal_2;
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- unsigned short int sem_nsems; /* number of semaphores in set */
- char __paddind[sizeof(long int) - sizeof(short int)];
#else
- char __padding[sizeof(long int) - sizeof(short int)];
- unsigned short int sem_nsems; /* number of semaphores in set */
+ __time_t sem_ctime; /* last time changed by semctl() */
#endif
- unsigned long int __uclibc_unused3;
- unsigned long int __uclibc_unused4;
+#if (__WORDSIZE == 32 && !defined(__arm__) && !defined(__or1k__) && !defined(__xtensa__)) || \
+ ((defined(__arm__) || defined(__or1k__) || defined(__xtensa__)) && !defined(__UCLIBC_USE_TIME64__))
+ unsigned long int __uclibc_unused2;
+#endif
+ unsigned long int sem_nsems; /* number of semaphores in set */
+#if defined(__UCLIBC_USE_TIME64__)
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
+#endif
+ unsigned long int __uclibc_unused3;
+ unsigned long int __uclibc_unused4;
};
/* The user should define a union like the following to use it for arguments
--
2.44.0