Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions opal/mca/hwloc/hwloc1112/hwloc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ bug fixes (and other actions) for each version of hwloc since version
in v0.9.1).


Version 1.11.4
--------------
* Fix Linux build with -m32 with respect to libudev.
Thanks to Paul Hargrove for reporting the issue.


Version 1.11.3
--------------
* Fix /proc/mounts parsing on Linux by using mntent.h.
Expand Down
1 change: 1 addition & 0 deletions opal/mca/hwloc/hwloc1112/hwloc/README-ompi.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Cherry-picked commits after 1.11.2:

open-mpi/hwloc@d2d07b9a2268699e13e1644b4f2ef7a53ef7396c
open-mpi/hwloc@9549fd59af04dca2e2340e17f0e685f8c552d818
5 changes: 4 additions & 1 deletion opal/mca/hwloc/hwloc1112/hwloc/config/hwloc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,10 @@ EOF])
# Linux libudev support
if test "x$enable_libudev" != xno; then
AC_CHECK_HEADERS([libudev.h], [
AC_CHECK_LIB([udev], [udev_device_new_from_subsystem_sysname], [HWLOC_LIBS="$HWLOC_LIBS -ludev"])
AC_CHECK_LIB([udev], [udev_device_new_from_subsystem_sysname], [
HWLOC_LIBS="$HWLOC_LIBS -ludev"
AC_DEFINE([HWLOC_HAVE_LIBUDEV], [1], [Define to 1 if you have libudev.])
])
])
fi

Expand Down
10 changes: 5 additions & 5 deletions opal/mca/hwloc/hwloc1112/hwloc/src/topology-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_LIBUDEV_H
#ifdef HWLOC_HAVE_LIBUDEV
#include <libudev.h>
#endif
#include <sys/types.h>
Expand All @@ -46,7 +46,7 @@ struct hwloc_linux_backend_data_s {
char *root_path; /* NULL if unused */
int root_fd; /* The file descriptor for the file system root, used when browsing, e.g., Linux' sysfs and procfs. */
int is_real_fsroot; /* Boolean saying whether root_fd points to the real filesystem root of the system */
#ifdef HAVE_LIBUDEV_H
#ifdef HWLOC_HAVE_LIBUDEV
struct udev *udev; /* Global udev context */
#endif
char *dumped_hwdata_dirname;
Expand Down Expand Up @@ -4596,7 +4596,7 @@ hwloc_linux_block_class_fillinfos(struct hwloc_backend *backend,
*tmp = '\0';
hwloc_obj_add_info(obj, "LinuxDeviceID", line);

#ifdef HAVE_LIBUDEV_H
#ifdef HWLOC_HAVE_LIBUDEV
if (data->udev) {
struct udev_device *dev;
const char *prop;
Expand Down Expand Up @@ -5106,7 +5106,7 @@ hwloc_linux_backend_disable(struct hwloc_backend *backend)
free(data->root_path);
close(data->root_fd);
#endif
#ifdef HAVE_LIBUDEV_H
#ifdef HWLOC_HAVE_LIBUDEV
if (data->udev)
udev_unref(data->udev);
#endif
Expand Down Expand Up @@ -5177,7 +5177,7 @@ hwloc_linux_component_instantiate(struct hwloc_disc_component *component,
#endif
data->root_fd = root;

#ifdef HAVE_LIBUDEV_H
#ifdef HWLOC_HAVE_LIBUDEV
data->udev = NULL;
if (data->is_real_fsroot) {
data->udev = udev_new();
Expand Down