Your message dated Tue, 10 Nov 2020 18:03:58 +0000
with message-id <e1kcxzq-0002yp...@fasolo.debian.org>
and subject line Bug#970304: fixed in libdrm 2.4.103-1
has caused the Debian Bug report #970304,
regarding libdrm: FTBFS on kfreebsd-any
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
970304: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970304
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: libdrm
Version: 2.4.102-1
Severity: important
Tags: ftbfs, patch
User: debian-k...@lists.debian.org
Usertags: kfreebsd

Hello,

Currently libdrm FTBFS GNU/kFreeBSD (and GNU/Hurd) due to usage of
#elif __FreeBSD__ instead of #elif defined(__FreeBSD__) in xf86drm.c.

Attached is a patch to fix this: xf86drm.c.diff. For completeness all
entries of #ifdef __linux__ are also replaced by #if
defined(__linux__), and similar for ifdef __FreeBSD__. This patch is
enough to make libdrm build properly on kfreebsd-any.

Patches for Hurd together with fixes for PATH_MAX issues will be added
to bug report #909436. 

Thanks!
Index: libdrm-2.4.102/xf86drm.c
===================================================================
--- libdrm-2.4.102.orig/xf86drm.c
+++ libdrm-2.4.102/xf86drm.c
@@ -491,7 +491,7 @@ drm_public int drmAvailable(void)
     int           fd;
 
     if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) {
-#ifdef __linux__
+#if defined(__linux__)
         /* Try proc for backward Linux compatibility */
         if (!access("/proc/dri/0", R_OK))
             return 1;
@@ -524,7 +524,7 @@ static int drmGetMinorBase(int type)
 
 static int drmGetMinorType(int major, int minor)
 {
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__)
     char name[SPECNAMELEN];
     int id;
 
@@ -688,7 +688,7 @@ static int drmOpenByName(const char *nam
         }
     }
 
-#ifdef __linux__
+#if defined(__linux__)
     /* Backward-compatibility /proc support */
     for (i = 0; i < 8; i++) {
         char proc_name[64], buf[512];
@@ -2775,7 +2775,7 @@ drm_public int drmIsMaster(int fd)
 
 drm_public char *drmGetDeviceNameFromFd(int fd)
 {
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__)
     struct stat sbuf;
     int maj, min;
     int nodetype;
@@ -2815,14 +2815,14 @@ drm_public char *drmGetDeviceNameFromFd(
 
 static bool drmNodeIsDRM(int maj, int min)
 {
-#ifdef __linux__
+#if defined(__linux__)
     char path[64];
     struct stat sbuf;
 
     snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/drm",
              maj, min);
     return stat(path, &sbuf) == 0;
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
     char name[SPECNAMELEN];
 
     if (!devname_r(makedev(maj, min), S_IFCHR, name, sizeof(name)))
@@ -2894,7 +2894,7 @@ drm_public int drmPrimeFDToHandle(int fd
 
 static char *drmGetMinorNameForFD(int fd, int type)
 {
-#ifdef __linux__
+#if defined(__linux__)
     DIR *sysdir;
     struct dirent *ent;
     struct stat sbuf;
@@ -2935,7 +2935,7 @@ static char *drmGetMinorNameForFD(int fd
 
     closedir(sysdir);
     return NULL;
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
     struct stat sbuf;
     char dname[SPECNAMELEN];
     const char *mname;
@@ -2998,7 +2998,7 @@ static char *drmGetMinorNameForFD(int fd
         return NULL;
 
     n = snprintf(buf, sizeof(buf), dev_name, DRM_DIR_NAME, min);
-    if (n == -1 || n >= sizeof(buf))
+    if (n == -1 || n >= (int)sizeof(buf))
         return NULL;
 
     return strdup(buf);
@@ -3015,7 +3015,7 @@ drm_public char *drmGetRenderDeviceNameF
     return drmGetMinorNameForFD(fd, DRM_NODE_RENDER);
 }
 
-#ifdef __linux__
+#if defined(__linux__)
 static char * DRM_PRINTFLIKE(2, 3)
 sysfs_uevent_get(const char *path, const char *fmt, ...)
 {
@@ -3062,7 +3062,7 @@ sysfs_uevent_get(const char *path, const
 /* Little white lie to avoid major rework of the existing code */
 #define DRM_BUS_VIRTIO 0x10
 
-#ifdef __linux__
+#if defined(__linux__)
 static int get_subsystem_type(const char *device_path)
 {
     char path[PATH_MAX + 1] = "";
@@ -3101,7 +3101,7 @@ static int get_subsystem_type(const char
 
 static int drmParseSubsystemType(int maj, int min)
 {
-#ifdef __linux__
+#if defined(__linux__)
     char path[PATH_MAX + 1] = "";
     char real_path[PATH_MAX + 1] = "";
     int subsystem_type;
@@ -3128,7 +3128,7 @@ static int drmParseSubsystemType(int maj
 #endif
 }
 
-#ifdef __linux__
+#if defined(__linux__)
 static void
 get_pci_path(int maj, int min, char *pci_path)
 {
@@ -3146,7 +3146,7 @@ get_pci_path(int maj, int min, char *pci
 }
 #endif
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__)
 static int get_sysctl_pci_bus_info(int maj, int min, drmPciBusInfoPtr info)
 {
     char dname[SPECNAMELEN];
@@ -3208,7 +3208,7 @@ static int get_sysctl_pci_bus_info(int m
 
 static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info)
 {
-#ifdef __linux__
+#if defined(__linux__)
     unsigned int domain, bus, dev, func;
     char pci_path[PATH_MAX + 1], *value;
     int num;
@@ -3255,7 +3255,7 @@ static int drmParsePciBusInfo(int maj, i
     info->func = pinfo.func;
 
     return 0;
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
     return get_sysctl_pci_bus_info(maj, min, info);
 #else
 #warning "Missing implementation of drmParsePciBusInfo"
@@ -3317,7 +3317,7 @@ static int drmGetMaxNodeName(void)
            3 /* length of the node number */;
 }
 
-#ifdef __linux__
+#if defined(__linux__)
 static int parse_separate_sysfs_files(int maj, int min,
                                       drmPciDeviceInfoPtr device,
                                       bool ignore_revision)
@@ -3391,7 +3391,7 @@ static int drmParsePciDeviceInfo(int maj
                                  drmPciDeviceInfoPtr device,
                                  uint32_t flags)
 {
-#ifdef __linux__
+#if defined(__linux__)
     if (!(flags & DRM_DEVICE_GET_PCI_REVISION))
         return parse_separate_sysfs_files(maj, min, device, true);
 
@@ -3424,7 +3424,7 @@ static int drmParsePciDeviceInfo(int maj
     device->subdevice_id = pinfo.subdevice_id;
 
     return 0;
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
     drmPciBusInfo info;
     struct pci_conf_io pc;
     struct pci_match_conf patterns[1];
@@ -3615,7 +3615,7 @@ free_device:
     return ret;
 }
 
-#ifdef __linux__
+#if defined(__linux__)
 static int drm_usb_dev_path(int maj, int min, char *path, size_t len)
 {
     char *value, *tmp_path, *slash;
@@ -3657,7 +3657,7 @@ static int drm_usb_dev_path(int maj, int
 
 static int drmParseUsbBusInfo(int maj, int min, drmUsbBusInfoPtr info)
 {
-#ifdef __linux__
+#if defined(__linux__)
     char path[PATH_MAX + 1], *value;
     unsigned int bus, dev;
     int ret;
@@ -3698,7 +3698,7 @@ static int drmParseUsbBusInfo(int maj, i
 
 static int drmParseUsbDeviceInfo(int maj, int min, drmUsbDeviceInfoPtr info)
 {
-#ifdef __linux__
+#if defined(__linux__)
     char path[PATH_MAX + 1], *value;
     unsigned int vendor, product;
     int ret;
@@ -3768,7 +3768,7 @@ free_device:
 
 static int drmParseOFBusInfo(int maj, int min, char *fullname)
 {
-#ifdef __linux__
+#if defined(__linux__)
     char path[PATH_MAX + 1], *name, *tmp_name;
 
     snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min);
@@ -3803,7 +3803,7 @@ static int drmParseOFBusInfo(int maj, in
 
 static int drmParseOFDeviceInfo(int maj, int min, char ***compatible)
 {
-#ifdef __linux__
+#if defined(__linux__)
     char path[PATH_MAX + 1], *value, *tmp_name;
     unsigned int count, i;
     int err;
@@ -4278,7 +4278,7 @@ drm_public int drmGetDevices(drmDevicePt
 
 drm_public char *drmGetDeviceNameFromFd2(int fd)
 {
-#ifdef __linux__
+#if defined(__linux__)
     struct stat sbuf;
     char path[PATH_MAX + 1], *value;
     unsigned int maj, min;
@@ -4302,7 +4302,7 @@ drm_public char *drmGetDeviceNameFromFd2
     free(value);
 
     return strdup(path);
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
     return drmGetDeviceNameFromFd(fd);
 #else
     struct stat      sbuf;

--- End Message ---
--- Begin Message ---
Source: libdrm
Source-Version: 2.4.103-1
Done: Timo Aaltonen <tjaal...@debian.org>

We believe that the bug you reported is fixed in the latest version of
libdrm, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 970...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Timo Aaltonen <tjaal...@debian.org> (supplier of updated libdrm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 10 Nov 2020 19:51:20 +0200
Source: libdrm
Architecture: source
Version: 2.4.103-1
Distribution: unstable
Urgency: medium
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: Timo Aaltonen <tjaal...@debian.org>
Closes: 909436 970304
Changes:
 libdrm (2.4.103-1) unstable; urgency=medium
 .
   * New upstream release. (Closes: #970304)
   * control, rules, hurd-port.diff: Add support for Hurd. (Closes:
     #909436)
Checksums-Sha1:
 49f95a424ad26daeb60293cbca386cb174f71059 3326 libdrm_2.4.103-1.dsc
 7583f6c48fca590cbf813e6d92bc4d26f7f4e0ee 412796 libdrm_2.4.103.orig.tar.xz
 b072ee945f648eb9462c927bbded31291fe6e855 833 libdrm_2.4.103.orig.tar.xz.asc
 5e6d56ee7baf0b7fc51ebb077b93cb9811cc4c7c 54832 libdrm_2.4.103-1.debian.tar.xz
 ecb02b98684c3fded6c642d498d9a45fa73d30b9 8219 libdrm_2.4.103-1_source.buildinfo
Checksums-Sha256:
 7580d383c04f83ee1f03e4dc1e9de7331517b2d195bce62186d1c0d7a44c02b4 3326 
libdrm_2.4.103-1.dsc
 3fe0affdba6460166a7323290c18cf68e9b59edcb520722826cb244e9cb50222 412796 
libdrm_2.4.103.orig.tar.xz
 b15719eb4943fed298dfe94eb8192c183ca4771d07c3eb55be494b73d47a9178 833 
libdrm_2.4.103.orig.tar.xz.asc
 057cce20c8d9227a3c0b69b8af156046261bf126eae5e89db3b78790e3d866e2 54832 
libdrm_2.4.103-1.debian.tar.xz
 c14c7842399c284f22eb7d766a93a760cf02a457f7d0734143f201b435eac357 8219 
libdrm_2.4.103-1_source.buildinfo
Files:
 a1e06e9101d14e09c08bb9b9c342a45e 3326 libs optional libdrm_2.4.103-1.dsc
 002e4e06e7f23fadc2ec6dbd03f3d1ee 412796 libs optional 
libdrm_2.4.103.orig.tar.xz
 7cef30fe10e154268b54552bc984a15a 833 libs optional 
libdrm_2.4.103.orig.tar.xz.asc
 d2e48b6b0aa32eacb0f1f3b33bdebebe 54832 libs optional 
libdrm_2.4.103-1.debian.tar.xz
 f81b95bca19c96571374529b8e4d6c17 8219 libs optional 
libdrm_2.4.103-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEdS3ifE3rFwGbS2Yjy3AxZaiJhNwFAl+q02EACgkQy3AxZaiJ
hNxW/w//VIE4gR9c8Nci0aYsDqACXPMpNiong2bMjTvNJ4Hlm/Pp1hZqhntPNK90
opYEAN5KpgzhMDwy44Ea6rnPb3wJqMvr+wXBQxa4hykgX/2CofzVwtJ/qiSP5B3j
1vZs8UhHGZOrrrHu4VYat9V6AOqBwq5EKjd0gIvIWh9LLfD3Z4e7k4VZsb5M9MU0
T0qqTpesu4/c0OW6yRAkqLO5jWEePuiKsSP84LzjclGyChivBHYCHi14Q4IGByzB
tkgYGgn8CycvYuzz434UN/JEQn4b/6WMs+/3OWwGSYZ0ZbVzL0ofUijUE/8mcZY1
zz22x3gzFIHjLcOj0K7cUCQxWhT2Uw7TmWYmb0yNAkUOWTBLgjtUp73RfCFKHGvj
KlWKXLa9Sq7NEx6pPNYbO24kPrJSS38inPwzPx6YOPDsprPGvJBL3Iqv0ebIZZQJ
lFL/pXK2yGvNV9wrfGIrSS+PenH1jOg1uhm4ESud/MvWPML0V0va0jUXRZp8KzIY
90GvGShwofTWchhr1THWvuXc/ORXV2wIPj7HzSZx5WioWEJ1DRp5kz68ya1l/+/c
ak/dStVtwP4ai+ETXDobKlEOfxSvHro2vspuopaxTb6jiB8L7KZbr9LplRdbJ9aK
ZtX+eZxA3j2LZ8HWAT5iHeJ/n2zpRtdBDXPwlDdVUALvbwum63Y=
=+b/X
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to