[PATCH] build: only define WITH_UDEV if enabled

Aleksander Morgado aleksander at aleksander.es
Fri Jun 23 08:07:07 UTC 2017


On 22/06/17 13:21, Ben Chan wrote:
> ---
>  configure.ac                   | 1 -
>  src/libmbim-glib/mbim-device.c | 4 ++--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 

Pushed to git master, thanks.

> diff --git a/configure.ac b/configure.ac
> index a4f0d84..b05333e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -141,7 +141,6 @@ case $with_udev in
>          fi
>          ;;
>      *)
> -        AC_DEFINE(WITH_UDEV, 0, [Define if you want udev support])
>          with_udev=no
>          ;;
>  esac
> diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c
> index 3919a87..35f4f1e 100644
> --- a/src/libmbim-glib/mbim-device.c
> +++ b/src/libmbim-glib/mbim-device.c
> @@ -39,7 +39,7 @@
>  #define IOCTL_WDM_MAX_COMMAND _IOR('H', 0xA0, guint16)
>  #define RETRY_TIMEOUT_SECS 5
>  
> -#if WITH_UDEV
> +#if defined WITH_UDEV
>  # include <gudev/gudev.h>
>  #endif
>  
> @@ -778,7 +778,7 @@ struct usb_cdc_mbim_desc {
>      guint8  bmNetworkCapabilities;
>  } __attribute__ ((packed));
>  
> -#if WITH_UDEV
> +#if defined WITH_UDEV
>  
>  static gchar *
>  get_descriptors_filepath (MbimDevice *self)
> 


-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list