From nobody@FreeBSD.org  Wed Jan 29 01:51:52 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id D4A71ECB
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 Jan 2014 01:51:52 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id C0F9B1FD1
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 Jan 2014 01:51:52 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0T1ppMr082761
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 Jan 2014 01:51:51 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0T1ppbE082744;
	Wed, 29 Jan 2014 01:51:51 GMT
	(envelope-from nobody)
Message-Id: <201401290151.s0T1ppbE082744@oldred.freebsd.org>
Date: Wed, 29 Jan 2014 01:51:51 GMT
From: Edwin Groothuis <edwin@mavetju.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: net-mgmt/libsmi - Clang / GCC issue
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: saper@saper.info

>Number:         186219
>Category:       ports
>Synopsis:       net-mgmt/libsmi - Clang / GCC issue
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 29 02:00:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Wed Jan 29 16:30:00 UTC 2014
>Originator:     Edwin Groothuis
>Release:        10.0
>Organization:
-
>Environment:
FreeBSD t43.nbttech.com 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Wireshark fails to compile with -WC++-compat on smi.h:

In file included from epan.c:63:
/usr/local/include/smi.h:319:1: error: empty struct has size 0 in C, size 1 in
      C++ [-Werror,-Wc++-compat]



>How-To-Repeat:

>Fix:
In smi.h:

 /* SmiElement -- an item in a list (row index column, notification object)   */
 typedef struct SmiElement {
+#ifdef __clang__
+    char dummy;         /* CLANG complains about this with -WC++-compat */
+#endif
 #ifndef __GNUC__
     char dummy;         /* many compilers are unhappy with empty structures. */
 #endif
     /* no visible attributes */
 } SmiElement;


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Jan 29 02:00:59 UTC 2014 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186219 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: saper@saper.info
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/186219: net-mgmt/libsmi - Clang / GCC issue
Date: Wed, 29 Jan 2014 02:00:58 UT

 Maintainer of net-mgmt/libsmi,
 
 Please note that PR ports/186219 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186219
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Marcin Cieslak <saper@saper.info>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/186219: net-mgmt/libsmi - Clang / GCC issue
Date: Wed, 29 Jan 2014 16:21:00 +0000

 On Wed, 29 Jan 2014, Edwin Groothuis wrote:
 
 > Maintainer of net-mgmt/libsmi,
 > 
 > Please note that PR ports/186219 has just been submitted.
 > 
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 
 Thanks, there is a fix in the SVN already,
 
 ===> Generating patch
 ===> Viewing diff with more
 diff -ruN --exclude=CVS /usr/ports/net-mgmt/libsmi.orig/Makefile /usr/ports/net-mgmt/libsmi/Makefile
 --- /usr/ports/net-mgmt/libsmi.orig/Makefile	2014-01-29 17:15:07.000000000 +0100
 +++ /usr/ports/net-mgmt/libsmi/Makefile	2014-01-29 17:19:09.000000000 +0100
 @@ -3,6 +3,7 @@
  
  PORTNAME=	libsmi
  PORTVERSION=	0.4.8
 +PORTREVISION=	1
  CATEGORIES=	net-mgmt
  MASTER_SITES=	ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/ \
  		LOCAL/bms
 diff -ruN --exclude=CVS /usr/ports/net-mgmt/libsmi.orig/files/patch-cppcompat /usr/ports/net-mgmt/libsmi/files/patch-cppcompat
 --- /usr/ports/net-mgmt/libsmi.orig/files/patch-cppcompat	1970-01-01 01:00:00.000000000 +0100
 +++ /usr/ports/net-mgmt/libsmi/files/patch-cppcompat	2014-01-29 17:15:07.000000000 +0100
 @@ -0,0 +1,32 @@
 +--- lib/smi.h.in.orig	2008-04-18 14:56:31.000000000 +0200
 ++++ lib/smi.h.in	2014-01-29 17:11:40.000000000 +0100
 +@@ -312,9 +312,10 @@
 + 
 + /* SmiElement -- an item in a list (row index column, notification object)   */
 + typedef struct SmiElement {
 +-#ifndef __GNUC__
 +-    char dummy;		/* many compilers are unhappy with empty structures. */
 +-#endif
 ++    char dummy;		/* C99 does not allow empty structs; some compilers
 ++			   accept them (gcc) but there are size differences
 ++			   between C and C++. So for portability reasons,
 ++			   we have this unused struct member. */
 +     /* no visible attributes */
 + } SmiElement;
 + 
 +--- lib/smi.h.orig	2008-04-18 14:58:06.000000000 +0200
 ++++ lib/smi.h	2014-01-29 17:11:59.000000000 +0100
 +@@ -312,9 +312,10 @@
 + 
 + /* SmiElement -- an item in a list (row index column, notification object)   */
 + typedef struct SmiElement {
 +-#ifndef __GNUC__
 +-    char dummy;		/* many compilers are unhappy with empty structures. */
 +-#endif
 ++    char dummy;		/* C99 does not allow empty structs; some compilers
 ++			   accept them (gcc) but there are size differences
 ++			   between C and C++. So for portability reasons,
 ++			   we have this unused struct member. */
 +     /* no visible attributes */
 + } SmiElement;
 + 
 ===> Done
>Unformatted:
