pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: net/ntp4 build failure on Debian Stretch [PATCH]



Hi all,

Ottavio Caruso wrote:
> # uname -a
> Linux e130 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 
> GNU/Linux
> 
> pkgsrc-current
> 
> net/npt4 "bmake build" fails as follows:
> [..]

This was due to not so portable NetBSD patches. Attached a patch that
fixes the build on Debian 10 (Buster) on which the errors were
identical. Tested on NetBSD 9 too.

OK to commit?

Sijmen
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/ntp4/distinfo,v
retrieving revision 1.32
diff -u -r1.32 distinfo
--- distinfo	15 Aug 2020 02:09:25 -0000	1.32
+++ distinfo	7 Oct 2020 07:27:40 -0000
@@ -27,13 +27,13 @@
 SHA1 (patch-ntpd_refclock__neoclock4x.c) = 66c38ba21572cb8804a39766f3b32d1b65cb0946
 SHA1 (patch-ntpd_refclock__oncore.c) = d93efa11cadc37fd9e600f80f2cbf0280be969c6
 SHA1 (patch-ntpd_refclock__ulink.c) = 55003f758fd71621db60ffad8a1880588098389e
-SHA1 (patch-ntpd_refclock__wwvb.c) = e1a7fc80df6dba9595788a8b8c56729619048ee4
+SHA1 (patch-ntpd_refclock__wwvb.c) = 18b088924c0a0f753f160930f05205e25caacf01
 SHA1 (patch-ntpdate_ntpdate.c) = 17e2534ab7a54e5af16059ca8c02c9995d79d83c
 SHA1 (patch-ntpdc_Makefile.in) = 6afaf915ee8c6b244f94d3733545231e69dfd14d
 SHA1 (patch-ntpq_ntpq.c) = 0776827a712e2f6636b9d322ae7445d184f3709f
 SHA1 (patch-sntp_libevent_build-aux_config.guess) = 5f5fff42d04daef5fcbba2bc09b015fb4489ca59
 SHA1 (patch-sntp_libevent_build-aux_config.sub) = 178e8b39138e49db7702c4bb84fe92550d14a978
-SHA1 (patch-sntp_libopts_autoopts.h) = d4cbaa31df97e04f3637349a3d5eb1addfa847db
+SHA1 (patch-sntp_libopts_autoopts.h) = 9f1c5b83622d4472f23cb3bdaec16af9686cf796
 SHA1 (patch-sntp_libopts_enum.c) = 7d6624ed84a6ea6f85b4de4c37480041a7603252
 SHA1 (patch-sntp_libopts_usage.c) = ec77942c98965c13de625b930db3458d5b81d28b
 SHA1 (patch-sntp_loc_pkgsrc) = 6e46ffc0cc2afcfdc1d01297cbe04cb80d103575
Index: patches/patch-ntpd_refclock__wwvb.c
===================================================================
RCS file: /cvsroot/pkgsrc/net/ntp4/patches/patch-ntpd_refclock__wwvb.c,v
retrieving revision 1.1
diff -u -r1.1 patch-ntpd_refclock__wwvb.c
--- patches/patch-ntpd_refclock__wwvb.c	21 Jun 2020 15:10:47 -0000	1.1
+++ patches/patch-ntpd_refclock__wwvb.c	7 Oct 2020 07:27:40 -0000
@@ -1,16 +1,15 @@
 $NetBSD: patch-ntpd_refclock__wwvb.c,v 1.1 2020/06/21 15:10:47 taca Exp $
 
-* Changes from NetBSD base.
+ * Changes from NetBSD base w/ Linux fix
 
 --- ntpd/refclock_wwvb.c.orig	2014-12-30 00:29:38.000000000 +0000
 +++ ntpd/refclock_wwvb.c
-@@ -154,7 +154,8 @@ static	void	wwvb_control	(int, const str
+@@ -154,7 +154,7 @@ static	void	wwvb_control	(int, const str
  				 struct refclockstat *, struct peer *);
  #define		WWVB_CONTROL	wwvb_control
  #else
 -#define		WWVB_CONTROL	noentry
-+#define		WWVB_CONTROL	(void)(*)
-+noentry
++#define		WWVB_CONTROL	(void*)noentry
  #endif /* HAVE_PPSAPI */
  
  /*
Index: patches/patch-sntp_libopts_autoopts.h
===================================================================
RCS file: /cvsroot/pkgsrc/net/ntp4/patches/patch-sntp_libopts_autoopts.h,v
retrieving revision 1.1
diff -u -r1.1 patch-sntp_libopts_autoopts.h
--- patches/patch-sntp_libopts_autoopts.h	21 Jun 2020 15:10:47 -0000	1.1
+++ patches/patch-sntp_libopts_autoopts.h	7 Oct 2020 07:27:40 -0000
@@ -1,22 +1,29 @@
 $NetBSD: patch-sntp_libopts_autoopts.h,v 1.1 2020/06/21 15:10:47 taca Exp $
 
-* Changes from NetBSD base.
+ * Changes from NetBSD base.
+ * Compat for noreturn on old compilers
 
 --- sntp/libopts/autoopts.h.orig	2015-04-26 18:43:14.000000000 +0000
 +++ sntp/libopts/autoopts.h
-@@ -32,7 +32,11 @@
+@@ -32,7 +32,16 @@
  
  #ifndef AUTOGEN_AUTOOPTS_H
  #define AUTOGEN_AUTOOPTS_H
-+#if 0
- #include <stdnoreturn.h>
+-#include <stdnoreturn.h>
++
++#if __STDC_VERSION__ >= 201112L
++#  include <stdnoreturn.h>
++#elif defined(__GNUC__)
++#  define noreturn __atribute__((noreturn))
++#elif defined(__NetBSD__)
++#  define noreturn __dead
 +#else
-+#define noreturn __dead
++#  define noreturn
 +#endif
  
  #define AO_NAME_LIMIT           127
  #define AO_NAME_SIZE            ((size_t)(AO_NAME_LIMIT + 1))
-@@ -452,7 +456,7 @@ typedef enum { AOFLAG_TABLE } ao_flags_t
+@@ -452,7 +461,7 @@ typedef enum { AOFLAG_TABLE } ao_flags_t
  #undef  _aof_
  
  static char const   zNil[] = "";


Home | Main Index | Thread Index | Old Index