[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
- [Libcdio-devel] [PATCH v2 0/5] OS/2 patches, KO Myung-Hun, 2017/02/05
- [Libcdio-devel] [PATCH v2 3/5] Fix double-free in cd-drive.c when a device name is not specified, KO Myung-Hun, 2017/02/05
- [Libcdio-devel] [PATCH v2 2/5] Implement get_last_session_os2(), KO Myung-Hun, 2017/02/05
- [Libcdio-devel] [PATCH v2 1/5] Fix name conflicts of SafeDosDevIOCtl() with kLIBC v0.6.6, KO Myung-Hun, 2017/02/05
- [Libcdio-devel] [PATCH v2 4/5] Add unit test for OS/2 driver, KO Myung-Hun, 2017/02/05
- [Libcdio-devel] [PATCH v2 5/5] Fix compilation on OS/2,
KO Myung-Hun <=
- Re: [Libcdio-devel] [PATCH v2 0/5] OS/2 patches, Rocky Bernstein, 2017/02/05