Bug 223819 - net/ntp: RIPENCC TRIMBLE DRIVER COMPILE ERROR
Summary: net/ntp: RIPENCC TRIMBLE DRIVER COMPILE ERROR
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-23 14:31 UTC by Fabio Giudici
Modified: 2018-02-02 07:01 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments
MAKE with MAKE_JOBS_UNSAFE=yes (212.74 KB, text/plain)
2017-11-23 14:31 UTC, Fabio Giudici
no flags Details
pr223819.diff: patch (1.86 KB, patch)
2017-11-24 06:07 UTC, Cy Schubert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Giudici 2017-11-23 14:31:26 UTC
Created attachment 188216 [details]
MAKE with MAKE_JOBS_UNSAFE=yes

I am trying to rebuild my NTP Stratum-1 FreeBSD error using FreeBSD 11.1.

 Trying to recompile the NTP with support for RIPENCC TRIMBLE CARD I end up with a compilation error:


refclock_ripencc.c:5062:44: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
                        if (Flags&(1<<i)) pbuf += sprintf(pbuf, LeapStatusText[i]);
                                                                ^~~~~~~~~~~~~~~~~
refclock_ripencc.c:5062:44: note: treat the string as an argument to avoid this
                        if (Flags&(1<<i)) pbuf += sprintf(pbuf, LeapStatusText[i]);
                                                                ^
                                                                "%s",
refclock_ripencc.c:5247:9: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Wnon-literal-null-conversion]
        pbuf = '\0';
               ^~~~
12 warnings and 1 error generated.
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/net/ntp/work/ntp-4.2.8p10/ntpd
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/net/ntp/work/ntp-4.2.8p10/ntpd
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/net/ntp/work/ntp-4.2.8p10
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/net/ntp/work/ntp-4.2.8p10
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/ntp
*** Error code 1

Stop.
make: stopped in /usr/ports/net/ntp



It seems being related to a C compiler issue... Any idea/workaround?
I know that RipeNCC driver is really old (2002) but we still use that card and the old server on which it was installed (with FREBSD 9.2) died.
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2017-11-24 06:07:36 UTC
Created attachment 188235 [details]
pr223819.diff: patch

Can you give this a spin?
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-02-02 06:55:56 UTC
A commit references this bug:

Author: cy
Date: Fri Feb  2 06:55:52 UTC 2018
New revision: 460670
URL: https://svnweb.freebsd.org/changeset/ports/460670

Log:
  Fix RIPENCC TRIMBLE driver compile error.

  PR:		223819

Changes:
  head/net/ntp/Makefile
  head/net/ntp/files/patch-ntpd__refclock__ripencc.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-02-02 07:01:02 UTC
A commit references this bug:

Author: cy
Date: Fri Feb  2 07:00:18 UTC 2018
New revision: 460673
URL: https://svnweb.freebsd.org/changeset/ports/460673

Log:
  Fix RIPENCC TRIMBLE driver compile error.

  PR:		223819

Changes:
  head/net/ntp-devel/Makefile
  head/net/ntp-devel/files/patch-ntpd__refclock__ripencc.c