Commit 1972e922 authored by Eero Tamminen's avatar Eero Tamminen Committed by Alan Coopersmith
Browse files

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
Signed-off-by: Eero Tamminen's avatarEero Tamminen <>

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's avatarEmil Velikov <>
Reviewed-by: Jasper St. Pierre's avatarJasper St. Pierre <>
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <>
parent ed340abc
......@@ -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();
# error "Unsupported OS"
return err;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment