# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../udev/SC_GET_SIZE_MAX.patch # Copyright (C) 2011 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- udev-147/libudev/libudev-util-private.c.vanilla 2011-01-05 18:18:23.000000000 +0100 +++ udev-147/libudev/libudev-util-private.c 2011-01-05 18:18:37.000000000 +0100 @@ -21,6 +21,7 @@ #include #include #include +#include #include "libudev.h" #include "libudev-private.h" @@ -123,7 +124,7 @@ uid_t util_lookup_user(struct udev *udev, const char *user) { char *endptr; - int buflen = sysconf(_SC_GETPW_R_SIZE_MAX); + int buflen = PATH_MAX; /* sysconf(_SC_GETPW_R_SIZE_MAX); */ char buf[buflen]; struct passwd pwbuf; struct passwd *pw; @@ -153,7 +153,7 @@ gid_t util_lookup_group(struct udev *udev, const char *group) { char *endptr; - int buflen = sysconf(_SC_GETGR_R_SIZE_MAX); + int buflen = PATH_MAX; /* sysconf(_SC_GETGR_R_SIZE_MAX); */ char *buf; struct group grbuf; struct group *gr;