mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
udev: Fix build on older platforms
Caused by commit @d1eea6c1 due to the missing symbol on older platforms. Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
f9b69c8289
commit
5970b13982
@ -34,6 +34,14 @@ AC_DEFUN([LIBVIRT_CHECK_UDEV],[
|
|||||||
if test "$with_udev_logging" = "yes" ; then
|
if test "$with_udev_logging" = "yes" ; then
|
||||||
AC_DEFINE_UNQUOTED([HAVE_UDEV_LOGGING], 1, [whether libudev logging can be used])
|
AC_DEFINE_UNQUOTED([HAVE_UDEV_LOGGING], 1, [whether libudev logging can be used])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
old_CFLAGS="$CFLAGS"
|
||||||
|
old_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $UDEV_CFLAGS"
|
||||||
|
LIBS="$CFLAGS $UDEV_LIBS"
|
||||||
|
AC_CHECK_FUNCS([udev_monitor_set_receive_buffer_size])
|
||||||
|
CFLAGS="$old_CFLAGS"
|
||||||
|
LIBS="$old_LIBS"
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -1764,12 +1764,14 @@ static int nodeStateInitialize(bool privileged,
|
|||||||
|
|
||||||
udev_monitor_enable_receiving(priv->udev_monitor);
|
udev_monitor_enable_receiving(priv->udev_monitor);
|
||||||
|
|
||||||
|
#if HAVE_UDEV_MONITOR_SET_RECEIVE_BUFFER_SIZE
|
||||||
/* mimic udevd's behaviour and override the systems rmem_max limit in case
|
/* mimic udevd's behaviour and override the systems rmem_max limit in case
|
||||||
* there's a significant number of device 'add' events
|
* there's a significant number of device 'add' events
|
||||||
*/
|
*/
|
||||||
if (geteuid() == 0)
|
if (geteuid() == 0)
|
||||||
udev_monitor_set_receive_buffer_size(priv->udev_monitor,
|
udev_monitor_set_receive_buffer_size(priv->udev_monitor,
|
||||||
128 * 1024 * 1024);
|
128 * 1024 * 1024);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* We register the monitor with the event callback so we are
|
/* We register the monitor with the event callback so we are
|
||||||
* notified by udev of device changes before we enumerate existing
|
* notified by udev of device changes before we enumerate existing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user