Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2018 11:53:19 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r478122 - head/net/latd
Message-ID:  <201808261153.w7QBrJ2J005210@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sun Aug 26 11:53:19 2018
New Revision: 478122
URL: https://svnweb.freebsd.org/changeset/ports/478122

Log:
  net/latd: Fix build with Clang 6
  
  llogin.cc:233:25: error: non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list [-Wc++11-narrowing]
          char verboseflag[1] = {verbose};
                                 ^~~~~~~
  
  http://beefy11.nyi.freebsd.org/data/head-i386-default/p477696_s338122/logs/latd-1.31.log
  
  interfaces-bpf.cc:68:38: error: non-constant-expression cannot be narrowed from type 'long' to 'bpf_u_int32' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
    BPF_STMT(BPF_LD + BPF_H + BPF_ABS, LATD_OFFSETOF(struct ether_header, ether_type)),
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  interfaces-bpf.cc:62:29: note: expanded from macro 'LATD_OFFSETOF'
  #define LATD_OFFSETOF(t, m) (((char *) &(((t *) NULL)-> m)) - ((char *) ((t *) NULL)))
                              ^

Modified:
  head/net/latd/Makefile

Modified: head/net/latd/Makefile
==============================================================================
--- head/net/latd/Makefile	Sun Aug 26 11:19:21 2018	(r478121)
+++ head/net/latd/Makefile	Sun Aug 26 11:53:19 2018	(r478122)
@@ -11,8 +11,11 @@ COMMENT=	Linux-DECnet project LAT protocol suite
 
 LICENSE=	GPLv2
 
-USES=		alias
+USES=		alias compiler
 GNU_CONFIGURE=	yes
+
+CXXFLAGS+=	${CXXFLAGS_${CHOSEN_COMPILER_TYPE}}
+CXXFLAGS_clang=	-Wno-c++11-narrowing
 
 PLIST_FILES=	bin/llogin etc/latd.conf.sample \
 		man/man1/llogin.1.gz man/man5/latd.conf.5.gz \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808261153.w7QBrJ2J005210>