# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/bluez/hotfix-udev.patch # Copyright (C) 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- --- bluez-5.74/configure.vanilla 2025-01-09 13:31:30.596666664 +0100 +++ bluez-5.74/configure 2025-01-09 13:34:18.346666655 +0100 @@ -15542,11 +15542,11 @@ elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev >= 196\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libudev >= 196") 2>&5 + ($PKG_CONFIG --exists --print-errors "libudev >= 182") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_UDEV_CFLAGS=`$PKG_CONFIG --cflags "libudev >= 196" 2>/dev/null` + pkg_cv_UDEV_CFLAGS=`$PKG_CONFIG --cflags "libudev >= 182" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -15559,11 +15559,11 @@ elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev >= 196\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libudev >= 196") 2>&5 + ($PKG_CONFIG --exists --print-errors "libudev >= 12") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_UDEV_LIBS=`$PKG_CONFIG --libs "libudev >= 196" 2>/dev/null` + pkg_cv_UDEV_LIBS=`$PKG_CONFIG --libs "libudev >= 182" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -15584,9 +15584,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - UDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libudev >= 196" 2>&1` + UDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libudev >= 182" 2>&1` else - UDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libudev >= 196" 2>&1` + UDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libudev >= 182" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$UDEV_PKG_ERRORS" >&5 --- bluez-5.74/src/oui.c.vanilla 2025-01-09 13:40:57.683333330 +0100 +++ bluez-5.74/src/oui.c 2025-01-09 13:41:38.336666657 +0100 @@ -26,6 +26,7 @@ struct udev_list_entry *head, *entry; char modalias[11], *comp = NULL; +#if 0 sprintf(modalias, "OUI:%2.2X%2.2X%2.2X", ba->b[5], ba->b[4], ba->b[3]); udev = udev_new(); @@ -51,7 +52,7 @@ done: udev = udev_unref(udev); - +#endif return comp; } #else --- bluez-5.74/monitor/hwdb.c.vanilla 2025-01-09 13:37:22.223333331 +0100 +++ bluez-5.74/monitor/hwdb.c 2025-01-09 13:40:48.539999993 +0100 @@ -27,8 +27,8 @@ struct udev *udev; struct udev_hwdb *hwdb; struct udev_list_entry *head, *entry; - bool result; - + bool result = false; +#if 0 udev = udev_new(); if (!udev) return false; @@ -62,7 +62,7 @@ done: udev = udev_unref(udev); - +#endif return result; } @@ -72,11 +72,12 @@ struct udev_hwdb *hwdb; struct udev_list_entry *head, *entry; char modalias[11]; - bool result; + bool result = false; if (!bdaddr[2] && !bdaddr[1] && !bdaddr[0]) return false; +#if 0 sprintf(modalias, "OUI:%2.2X%2.2X%2.2X", bdaddr[5], bdaddr[4], bdaddr[3]); @@ -109,7 +109,7 @@ done: udev = udev_unref(udev); - +#endif return result; } #else