Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2019 11:52:50 +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: r504416 - in head/devel/kronosnet: . files
Message-ID:  <201906171152.x5HBqo9I025059@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Jun 17 11:52:50 2019
New Revision: 504416
URL: https://svnweb.freebsd.org/changeset/ports/504416

Log:
  devel/kronosnet: Unbreak build with GCC 9
  
  In file included from common.c:22:
  In function 'open_lib',
      inlined from 'load_module' at common.c:130:11:
  logging.h:21:17: error: '%s' directive argument is null [-Werror=format-overflow=]
     21 | #define LOG_MSG log_msg
        |                 ^
  logging.h:30:2: note: in expansion of macro 'LOG_MSG'
     30 |  LOG_MSG(knet_h, subsys, KNET_LOG_WARN, fmt, ##args)
        |  ^~~~~~~
  common.c:85:3: note: in expansion of macro 'log_warn'
     85 |   log_warn(knet_h, KNET_SUB_COMMON, "unable to dlinfo %s: %s",
        |   ^~~~~~~~
  common.c: In function 'load_module':
  common.c:85:59: note: format string is defined here
     85 |   log_warn(knet_h, KNET_SUB_COMMON, "unable to dlinfo %s: %s",
        |
  
  PR:		238330
  Obtained from:	upstream

Added:
  head/devel/kronosnet/files/patch-libknet_common.c   (contents, props changed)
Modified:
  head/devel/kronosnet/Makefile

Modified: head/devel/kronosnet/Makefile
==============================================================================
--- head/devel/kronosnet/Makefile	Mon Jun 17 11:51:10 2019	(r504415)
+++ head/devel/kronosnet/Makefile	Mon Jun 17 11:52:50 2019	(r504416)
@@ -3,7 +3,7 @@
 
 PORTNAME=	kronosnet
 PORTVERSION=	1.3
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	devel
 MASTER_SITES=	https://kronosnet.org/releases/
 

Added: head/devel/kronosnet/files/patch-libknet_common.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kronosnet/files/patch-libknet_common.c	Mon Jun 17 11:52:50 2019	(r504416)
@@ -0,0 +1,22 @@
+From 97924ac12d8da26b61d3bc3ab90fbd86b0b58e72 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
+Date: Thu, 24 Jan 2019 14:54:24 +0100
+Subject: [PATCH] [common] fix not reporting a true dlinfo error cause
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This was automatically caught with GCC 9
+("'%s' directive argument is null").
+
+Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
+--- libknet/common.c.orig	2018-02-25 04:32:12 UTC
++++ libknet/common.c
+@@ -82,6 +82,7 @@ static void *open_lib(knet_handle_t knet_h, const char
+ 		/*
+ 		 * should we dlclose and return error?
+ 		 */
++		error = dlerror();
+ 		log_warn(knet_h, KNET_SUB_COMMON, "unable to dlinfo %s: %s",
+ 			 libname, error);
+ 	} else {



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