summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEero Tamminen <eero.t.tamminen@intel.com>2015-02-10 14:55:22 +0000
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-02-12 14:10:10 -0800
commit1972e9223764618aedc5adc32b64b2c043d1b826 (patch)
tree964ea306f8dc5489381738cb691484c0f44a60c4
parented340abc37b07cb9fc788ae77d837088c54cd16a (diff)
downloadxorg-lib-libpciaccess-1972e9223764618aedc5adc32b64b2c043d1b826.tar.gz
Check for __linux__ instead of linux during compilation
"__linux__" is the POSIX define for checking for Linux OS, "linux" is deprecated and apparently not supported by Android. Besides correcting the define, patch adds error for the case OS isn't recognized. Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com> v2: Drop double negative from commit msg. Spotted by Mateusz Jończyk. [Emil Velikov: Remove irrelevant Android details from commit msg.] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/common_init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common_init.c b/src/common_init.c
index a127a8b..b1c0c3e 100644
--- a/src/common_init.c
+++ b/src/common_init.c
@@ -52,7 +52,7 @@ pci_system_init( void )
{
int err = ENOSYS;
-#ifdef linux
+#ifdef __linux__
err = pci_system_linux_sysfs_create();
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
err = pci_system_freebsd_create();
@@ -64,6 +64,8 @@ pci_system_init( void )
err = pci_system_solx_devfs_create();
#elif defined(__GNU__) || defined(__CYGWIN__)
err = pci_system_x86_create();
+#else
+# error "Unsupported OS"
#endif
return err;