summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2008-01-29 23:14:21 +0000
committerChristophe Fergeau <teuf@gnome.org>2008-01-29 23:14:21 +0000
commitd260fb7c7ab3e2914aae4404a53da9e4fcc374ec (patch)
treea6a51d43722d1697c8b6c484e2e66a2370ef3f19 /src
parenta5faa1006ab08ed13d67956257df19e44d0f7f54 (diff)
downloadlibgpod-d260fb7c7ab3e2914aae4404a53da9e4fcc374ec.tar.gz
libgpod-d260fb7c7ab3e2914aae4404a53da9e4fcc374ec.tar.xz
libgpod-d260fb7c7ab3e2914aae4404a53da9e4fcc374ec.zip
Portability fix: only include unistd.h when it's available
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1940 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src')
-rw-r--r--src/db-artwork-writer.c2
-rw-r--r--src/db-parse-context.c6
-rw-r--r--src/itdb_device.c2
-rw-r--r--src/itdb_itunesdb.c2
-rw-r--r--src/ithumb-writer.c2
5 files changed, 13 insertions, 1 deletions
diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c
index 31fb226..6de0c80 100644
--- a/src/db-artwork-writer.c
+++ b/src/db-artwork-writer.c
@@ -37,7 +37,9 @@
#include <errno.h>
#include <fcntl.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <sys/mman.h>
#include <sys/stat.h>
#include <stdio.h>
diff --git a/src/db-parse-context.c b/src/db-parse-context.c
index 7217abf..cf5171d 100644
--- a/src/db-parse-context.c
+++ b/src/db-parse-context.c
@@ -21,7 +21,9 @@
* This product is not supported/written/published by Apple!
*
*/
-
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/mman.h>
#include <sys/stat.h>
@@ -29,7 +31,9 @@
#include <errno.h>
#include <fcntl.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <glib.h>
#include "db-parse-context.h"
diff --git a/src/itdb_device.c b/src/itdb_device.c
index fc2511c..2116fe5 100644
--- a/src/itdb_device.c
+++ b/src/itdb_device.c
@@ -38,7 +38,9 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <glib/gi18n-lib.h>
static const Itdb_IpodInfo ipod_info_table [] = {
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index d1b26f7..325e90a 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -122,7 +122,9 @@
#include <sys/statvfs.h>
#include <sys/types.h>
#include <time.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#define ITUNESDB_DEBUG 0
#define ITUNESDB_MHIT_DEBUG 0
diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c
index 050671f..a5fb527 100644
--- a/src/ithumb-writer.c
+++ b/src/ithumb-writer.c
@@ -40,7 +40,9 @@
#include <locale.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>