libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libcdio-devel] [PATCH v2 5/5] Fix compilation on OS/2


From: KO Myung-Hun
Subject: [Libcdio-devel] [PATCH v2 5/5] Fix compilation on OS/2
Date: Sun, 5 Feb 2017 20:24:11 +0900

OS/2 kLIBC has a declaration for timegm() but not implemented it.

This causes compilation with gcc492 to fail due to 'static' existence.

-----
  CC       iso9660.lo
iso9660.c:75:1: error: static declaration of 'timegm' follows non-static 
declaration
 timegm(struct tm *tm)
 ^
In file included from ../../include/cdio/iso9660.h:37:0,
                 from iso9660.c:32:
f:/lang/gcc/usr/include/time.h:188:8: note: previous declaration of 'timegm' 
was here
 time_t timegm(struct tm * const);
        ^
-----
---
 lib/iso9660/iso9660.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/iso9660/iso9660.c b/lib/iso9660/iso9660.c
index 009a88b1..387ab494 100644
--- a/lib/iso9660/iso9660.c
+++ b/lib/iso9660/iso9660.c
@@ -71,7 +71,11 @@ unsetenv(const char *envname)
 #endif
 
 #ifndef HAVE_TIMEGM
+#ifndef __KLIBC__
 static time_t
+#else
+time_t
+#endif
 timegm(struct tm *tm)
 {
   time_t ret;
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]