Package: ssmping
Version: 0.9.1-2
Severity: normal
Tags: patch
Hello,
I noticed that ssmp 0.9.1 fails to build from source with reasonably new glibc.
Since I don't see a bug tracker or mailing list, I'm reporting it here.
First, compilation fails:
ssmpingd.c: In function 'zerosrcinterface':
ssmpingd.c:44: error: dereferencing pointer to incomplete type
There is also a type mismatch warning:
ssmping.c:55: warning: passing argument 3 of 'getsockname' from \
incompatible pointer type
The type mismatch matters when socklen_t and size_t have different widths.
And they do on most x86_64 systems (4 vs

.
Here are patches for both:
>From 04d6a7e30decfa754e2a6ae6f937cd64cd6df9a1 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering.RemoveThis@redhat.com>
Date: Tue, 3 Nov 2009 21:06:16 +0100
Subject: [PATCH 1/2] avoid a warning from gcc about type mismatch
* ssmping.c (main): Use socklen_t as type of variable whose address
is passed as arg 3 of getsockname , not size_t.
---
ssmping.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ssmping.c b/ssmping.c
index 92866c2..c3ca887 100644
--- a/ssmping.c
+++ b/ssmping.c
@@ -22,7 +22,7 @@ int main(int argc, char **argv) {
uint16_t size;
uint32_t intface;
struct sockaddr_storage name, ucaddr, mcaddr, grpaddr;
- size_t namelen;
+ socklen_t namelen;
#ifdef WIN32
WORD wVersionRequested;
WSADATA wsaData;
--
1.6.5.2.292.g1cda2
>From 81f29c8a0967b86de76fd0f5bbe7323886cf23f2 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering.RemoveThis@redhat.com>
Date: Tue, 3 Nov 2009 21:11:11 +0100
Subject: [PATCH 2/2] avoid compilation failure with modern glibc
* ssmpingd.c (_GNU_SOURCE): Define, so the use of pktinfo->ipi6_ifindex
works with recent glibc-based header files.
---
ssmpingd.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ssmpingd.c b/ssmpingd.c
index b45b674..4f24016 100644
--- a/ssmpingd.c
+++ b/ssmpingd.c
@@ -10,6 +10,8 @@
* copyright notice and this permission notice appear in all copies.
*/
+#define _GNU_SOURCE 1
+
#include "ssmping.h"
#ifndef WIN32
--
1.6.5.2.292.g1cda2
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (400, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30-1-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash
Versions of packages ssmping depends on:
ii libc6 2.10.1-5 GNU C Library: Shared libraries
ssmping recommends no packages.
ssmping suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org