MINGW-packages/mingw-w64-check/001-fix-build-with-mingw-w64-clang.patch
مهدي شينون (Mehdi Chinoune) 7e52153449 check: Fix build with clang
2025-06-01 13:38:43 +01:00

43 lines
1.7 KiB
Diff

--- a/configure.ac
+++ b/configure.ac
@@ -339,8 +339,8 @@
HW_LIBRT_TIMERS
# The following checks will replace missing functions from libcompat
-AC_REPLACE_FUNCS([alarm clock_gettime getline gettimeofday localtime_r strdup strsignal])
-AC_CHECK_DECLS([alarm, clock_gettime, getline, gettimeofday, localtime_r, strdup, strsignal])
+AC_REPLACE_FUNCS([alarm getline gettimeofday localtime_r strdup strsignal])
+AC_CHECK_DECLS([alarm, getline, gettimeofday, localtime_r, strdup, strsignal])
# The following checks are to only detect if the functions exist, but
# not replace them
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -176,7 +176,7 @@
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp alarm.c \
- clock_gettime.c getline.c gettimeofday.c localtime_r.c \
+ getline.c gettimeofday.c localtime_r.c \
malloc.c realloc.c snprintf.c strdup.c strsignal.c \
timer_create.c timer_delete.c timer_settime.c
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -384,7 +384,6 @@
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alarm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clock_gettime.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getline.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gettimeofday.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/localtime_r.Plo@am__quote@
--- a/lib/libcompat.h
+++ b/lib/libcompat.h
@@ -264,7 +264,6 @@
*/
struct sigevent;
-CK_DLL_EXP int clock_gettime(clockid_t clk_id, struct timespec *ts);
CK_DLL_EXP int timer_create(clockid_t clockid, struct sigevent *sevp,
timer_t * timerid);
CK_DLL_EXP int timer_settime(timer_t timerid, int flags,