Package: lockdev
Version: 1.0.3-1.4
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hello,

lockdev currently FTBFS on hurd-i386, because sysmacros.h defines
major/minor() there, and not gnu_dev_major/minor(). MAXPATHLEN is also
used unconditionally, while POSIX says it is optional when there is no
hard limit.

The attached patch fixes both issues.

Samuel

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.4 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-- 
Samuel Thibault <samuel.thiba...@fnac.net>
<s> bah, j'aime bien les feux d'artifices, mais j'ai peur de me prendre un 
boeing sur le coin de la gueule si je vais sur le pont de brooklyn
 -+- #ens-mim - 11 septembre forever -+-
--- src/lockdev.c.orig  2012-04-16 02:16:00.561869186 +0200
+++ src/lockdev.c       2012-04-16 02:16:14.505569176 +0200
@@ -125,14 +125,23 @@
 #include <sys/file.h>
 #if defined (__GNU_LIBRARY__)
 # include <sys/sysmacros.h>
+#ifdef __GNU__
+# define MAJOR(dev) major (dev)
+# define MINOR(dev) minor (dev)
+#else
 # define MAJOR(dev) gnu_dev_major (dev)
 # define MINOR(dev) gnu_dev_minor (dev)
+#endif
 #else
 #  error "put here a define for MAJOR and MINOR"
 #endif
 
 #include "lockdev.h"
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 /*
  *     PROTOTYPES for internal functions
  *     all internal functions names start with _dl_

Reply via email to