Bug#557556: trousers: FTBFS on GNU/kFreeBSD
Package: trousers
Version: 0.3.2-7
Severity: important
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
Hi,
your package FTBFS on kfreebsd-*. I'm attaching a patch which almost
fixes it, but I'm now getting:
| ps_inspect.c: In function ‘main’:
| ps_inspect.c:342: error: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘off_t’
The OFF_T_PRINTF #defines at the top of tools/ps_inspect.c seem very
buggy too me, I guess you should be checking this kind of things from
configure.
Mraw,
KiBi.
--- a/src/include/trousers_types.h
+++ b/src/include/trousers_types.h
@@ -118,7 +118,7 @@ typedef struct tdTSS_KEY {
BYTE *encData;
} TSS_KEY;
-#if (defined (__linux) || defined (linux))
+#if (defined (__linux) || defined (linux) || defined (__GLIBC__))
#define BSD_CONST
#elif (defined (__OpenBSD__) || defined (__FreeBSD__))
#define BSD_CONST const
--- a/src/tcsd/platform.c
+++ b/src/tcsd/platform.c
@@ -13,7 +13,7 @@
#include <sys/param.h>
#include <sys/sysctl.h>
#include <err.h>
-#elif (defined (__linux) || defined (linux))
+#elif (defined (__linux) || defined (linux) || defined(__GLIBC__))
#include <utmp.h>
#endif
@@ -31,7 +31,7 @@
#include "tcslog.h"
-#if (defined (__linux) || defined (linux))
+#if (defined (__linux) || defined (linux) || defined(__GLIBC__))
MUTEX_DECLARE_INIT(utmp_lock);
char
--- a/src/tspi/ps/tspps.c
+++ b/src/tspi/ps/tspps.c
@@ -44,7 +44,7 @@ get_user_ps_path(char **file)
TSS_RESULT result;
char *file_name = NULL, *home_dir = NULL;
struct passwd *pwp;
-#if (defined (__linux) || defined (linux))
+#if (defined (__linux) || defined (linux) || defined(__GLIBC__))
struct passwd pw;
#endif
struct stat stat_buf;
@@ -64,7 +64,7 @@ get_user_ps_path(char **file)
setpwent();
while (1) {
-#if (defined (__linux) || defined (linux))
+#if (defined (__linux) || defined (linux) || defined(__GLIBC__))
rc = getpwent_r(&pw, buf, PASSWD_BUFSIZE, &pwp);
if (rc) {
LogDebugFn("USER PS: Error getting path to home directory: getpwent_r: %s",
Reply to: