diff --git a/src/node_device/node_device_driver.h b/src/node_device/node_device_driver.h index b6c6f182d3f3f450d7ba3be654866cbdf52e2737..9e97b7d2448d7397bbc7e5766a2a2ffe714bf82b 100644 --- a/src/node_device/node_device_driver.h +++ b/src/node_device/node_device_driver.h @@ -51,16 +51,7 @@ void nodeDeviceUnlock(virNodeDeviceDriverStatePtr driver); int nodedevRegister(void); -# ifdef __linux__ - -# define detect_scsi_host_caps(d) detect_scsi_host_caps_linux(d) -int detect_scsi_host_caps_linux(union _virNodeDevCapData *d); - -# else /* __linux__ */ - -# define detect_scsi_host_caps(d) (-1) - -# endif /* __linux__ */ +int detect_scsi_host_caps(union _virNodeDevCapData *d); int nodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags); int nodeListDevices(virConnectPtr conn, const char *cap, char **const names, diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c index 71c717269e670b6839684a0824c6a239ea7b9a1e..5228a01f445f5e6c22e1d0402d158897d3decfe8 100644 --- a/src/node_device/node_device_linux_sysfs.c +++ b/src/node_device/node_device_linux_sysfs.c @@ -39,7 +39,7 @@ #ifdef __linux__ int -detect_scsi_host_caps_linux(union _virNodeDevCapData *d) +detect_scsi_host_caps(union _virNodeDevCapData *d) { char *max_vports = NULL; char *vports = NULL; @@ -128,4 +128,12 @@ cleanup: return ret; } +#else + +int +detect_scsi_host_caps(union _virNodeDevCapData *d ATTRIBUTE_UNUSED) +{ + return -1; +} + #endif /* __linux__ */