Commit Graph

273 Commits

Author SHA1 Message Date
rillig d122acbd72 libntf: make MKREPRO timestamp compatible with NetBSD 10
In NetBSD 10, make(1) cannot handle :gmtime arguments that are
expressions, resulting in the error message "Unknown modifier '1'".
2024-04-21 17:19:52 +00:00
rillig 7202b80324 libntp: clean up MKREPRO_TIMESTAMP handling
NetBSD's make has built-in support for formatting timestamps, so use
that instead of relying on an external tool.  The month name is still
always in the C locale, and possible errors are reported in the affected
line, due to the ':=' assignment operator.

Without the ':=' assignment operator, the intermediate variable would
not be necessary, but in that case, make's error handling is broken and
unspecific.
2024-04-20 08:03:08 +00:00
jakllsch 466d1a15ac fix copy/paste-o 2024-04-19 16:04:28 +00:00
jakllsch 7386dcbbb8 Increase MKREPRO robustness
- Use C locale to ensure month abbreviations are as expected
 - bail out if MKREPRO_TIMESTAMP is not defined
 - bail out if resulting __DATE__/__TIME__ replacement strings are empty
2024-04-19 14:58:18 +00:00
jakllsch 05916288da The substitute __DATE__ should be %b %e %Y per a C18 draft
Subtle change that won't make a functional difference in this case;
changed only for semantic correctness.
2024-04-19 13:34:15 +00:00
jakllsch 1784c46724 Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__ 2024-04-18 19:23:53 +00:00
jakllsch 308afeb1b5 remove now-unused assignment 2024-04-12 19:06:45 +00:00
christos 0ba9bcdd8c fix format. 2024-04-03 00:38:36 +00:00
christos 3a91ec0ace use ${MKREPRO_TIMESTAMP} for baking in the date and time. 2024-04-02 14:19:02 +00:00
mrg f8570f8a97 fix simple mis-matched function prototype and definitions.
most of these are like, eg

   void foo(int[2]);

with either of these

   void foo(int*) { ... }
   void foo(int[]) { ... }

in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.

found by GCC 12.
2023-08-01 07:04:14 +00:00
lukem 58beaa2b43 adapt to ${CC_WNO_MAYBE_UNINITIALIZED}
Use ${CC_WNO_MAYBE_UNINITIALIZED} instead of
the older style more complex expressions.

Remove workarounds if they were for a specific
version of gcc < 10.
2023-06-03 21:31:45 +00:00
lukem 230c41e44c adapt to ${CC_WNO_IMPLICIT_FALLTHROUGH}
Use ${CC_WNO_IMPLICIT_FALLTHROUGH} instead of
the older style more complex expressions.
2023-06-03 21:30:20 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 09:09:01 +00:00
lukem f937c412f3 bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER
Provide a single variable
	CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
	CLANG_NO_ADDR_OF_PACKED_MEMBER
	CC_NO_ADDR_OF_PACKED_MEMBER
	GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 08:52:53 +00:00
christos 6d3d964ef4 Handle OpenSSL-3.x 2023-05-09 20:51:14 +00:00
christos 72781fabb5 Handle OpenSSL-3.x 2023-05-09 20:39:24 +00:00
christos b9606fa0cc importdate is no more 2022-12-13 21:16:38 +00:00
christos da8bb7f219 Remove the importdate hack to make things more similar with the upstream
script.
2022-12-13 18:36:41 +00:00
christos 1790571ce3 preserve the original logic if we don't have MKREPRO_TIMESTAMP, use consistent
version string with other builds.
2022-12-13 18:27:45 +00:00
martin 47ace57a28 When doing reproducible builds, don't import a "run" number in the
ntp tools config version files.
2022-12-13 18:15:29 +00:00
christos 50c1bace96 merge conflicts between ntp-4.2.8p1{4,5} 2022-10-09 21:41:03 +00:00
christos b8da6a3f08 (4.2.8p15) 2020/06/23 Released by Harlan Stenn <stenn@ntp.org>
* [Sec 3661] memory leak with AES128CMAC keys <perlinger@ntp.org>
* [Bug 3670] Regression from bad merge of 3592 and 3596 <perlinger@ntp.org>
  - fixed a bad merge that happened before 4.2.8-p14. Thanks to
    Sylar Tao for noticing this!
* [Bug 3667] decodenetnum fails with numeric port <perlinger@ntp.org>
  - rewrite 'decodenetnum()' in terms of inet_pton
* [Bug 3666] avoid unlimited receive buffer allocation <perlinger@ntp.org>
  - limit number of receive buffers, with an iron reserve for refclocks
* [Bug 3664] Enable openSSL CMAC support on Windows <burnicki@ntp.org>
* [Bug 3662] Fix build errors on Windows with VS2008 <burnicki@ntp.org>
* [Bug 3660] Manycast orphan mode startup discovery problem. <stenn@ntp.org>
  - integrated patch from Charles Claggett
* [Bug 3659] Move definition of psl[] from ntp_config.h to
  ntp_config.h <perlinger@ntp.org>
* [Bug 3657] Wrong "Autokey group mismatch" debug message <perlinger@ntp.org>
* [Bug 3655] ntpdc memstats hash counts <perlinger@ntp.org>
  - fix by Gerry garvey
* [Bug 3653] Refclock jitter RMS calculation <perlinger@ntp.org>
  - thanks to Gerry Garvey
* [Bug 3646] Avoid sync with unsync orphan <perlinger@ntp.org>
  - patch by Gerry Garvey
* [Bug 3644] Unsynchronized server [...] selected as candidate <perlinger@ntp.org>
* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. <abe@ntp.org>
  - applied patch by Takao Abe
2022-10-09 21:00:00 +00:00
mrg f5c1005436 apply some -Wno- to ignore several new warnings with GCC 10.
ntp: ignore truncation beyond api sizes, and ignore wrongly
guessed underflow

tmux: ignore maybe uninitialised warning for impossible case

libbfd: signed/unsigned variables assigned in the same statement

dri/gallium: -Wno-builtin-declaration-mismatch for u_atomic.c as
it implements backend functions with different in-C-machine but
same-in-real-machine types

libXfont/libXfont2: signed/unsigned variables assigned in the same
statement

i915drm: ignore impossible maybe uninitialised warnings

sysinst: ignore an invalid string truncation issue
2021-04-13 04:58:59 +00:00
mrg 7e5e03e2b7 new GCC_NO_* uses for warning issues. most of the users of the new
GCC_NO_RETURN_LOCAL_ADDR are bugs in GCC itself, not the code.
2021-04-12 06:08:30 +00:00
kardel bc82294d86 PR bin/55973:
fix routing message triggered one shot interface update.
2021-02-18 15:13:37 +00:00
roy 6dc0d09387 ntpd: ignore errno EINTR on reads from the routing socket 2021-01-31 08:27:49 +00:00
roy f5b263ffef ntpd: move route socket overflow message from LOG_ERR to LOG_DEBUG
While here stop caring about RTM_LOSING as that's purely informational.
If routing does change then we get RTM_ADD/DEL/CHANGE.
Also stop caring about RTM_IFANNOUNCE as we really only want addresses
and interface flag updates which we get by RTM_NEWADDR/DELADDR/CHGADDR and
RTM_IFINFO.
2021-01-31 08:26:47 +00:00
roy a391b1d3f3 ntp: respect user's wishes to disable interface scanning
While here, disable periodic scanning by default on NetBSD as it's
no longer needed.
The user can still enable it though with a positive number to the -U
option.

kardel@ So far I see no other issues from the pitfalls I know of
2021-01-03 15:33:05 +00:00
roy ddf02b2602 ntpd: In the event of route(4) overflow, update the interfaces 2021-01-01 17:21:47 +00:00
rin a8c74629f6 Support aarch64eb in */config.guess.
Cherry-picked from upstream:
https://git.savannah.gnu.org/gitweb/?p=config.git;a=commit;h=1c4398015583eb77bc043234f5734be055e64bea

Everything except external/apache2/llvm/dist/llvm/cmake/config.guess
is patched, which is under vendor tag and cannot be modified. I expect
that this file is not actually used as we use hand-crafted version of
configure script instead of cmake for building LLVM.

Note that external/apache2/llvm/autoconf/autoconf/config.guess has
already been committed on Oct. 20, but commit message disappeared as
cvs aborted due to "permission denied" when trying to modify the file
mentioned above. Sorry for confusing you.

Also note that GMP uses its own config.guess Patch for
external/lgpl3/gmp/dist/config.guess is provided by ryo@. Thanks!
2020-11-17 10:35:10 +00:00
christos 00a4973a0c include <bsd.own.mk> where missing. 2020-10-18 15:20:13 +00:00
rin 428b4e25bc Fix build; clean manpages only if they are generated automatically. 2020-10-11 07:07:31 +00:00
christos 64014ae499 PR/55710: Kimmo Suominen: Delete manual pages so that they get copy from the
imported, already generated ones.
2020-10-10 14:25:21 +00:00
christos 25e0134e2d Use .PARSEDIR 2020-10-10 14:23:48 +00:00
christos 8cd1dd28ab Add rules for manual pages builds, remove including Makefile.inc 2020-10-10 14:23:34 +00:00
christos 663d916a0c include bsd.own.mk so that ../../Makefile.inc does not do it... 2020-10-10 14:23:05 +00:00
christos b65092432b Wait for the asynchronous dns resolver child to be done (and close the
socket descriptors) before returning. Otherwise we might get bind errors.
Reported by kim@, fixed by mlelstv@.
2020-10-10 13:41:14 +00:00
mrg 3c4e3b4cdb avoid calling printf %s with NULL. fix idea from christos. 2020-09-07 00:48:45 +00:00
mrg cb93b81028 add support for new GCC 9 warnings that may be too much to fix
right now.  new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree.  mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it.  (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.)  clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.
2020-09-06 07:20:26 +00:00
kardel d566b44310 remove unneeded newline in quotes variable string - keeps ntpq happy 2020-09-03 07:26:41 +00:00
joerg a3a68b7379 Don't define psl as common symbol, move it into the only file using it. 2020-05-30 23:52:09 +00:00
christos f0574a0e8b make it compile again 2020-05-29 20:56:27 +00:00
christos 5b7d12e411 Add more printf annotations 2020-05-29 20:54:16 +00:00
christos fc16d48c3b put back the warn flags 2020-05-29 20:16:07 +00:00
christos 22eebdc3bb fix printf format warning with format_arg 2020-05-29 20:15:37 +00:00
christos 1c87ec2c04 Add explicit casts 2020-05-29 20:15:14 +00:00
christos b44539c331 fix WORDS_BIGENDIAN 2020-05-29 11:01:53 +00:00
kamil f1fd2e6f4c Fix the ntpd build with Clang/LLVM
Set -Wno-format-nonliteral for ntp_refclock.c
2020-05-29 10:53:02 +00:00
christos 1091d03bdb Fix incorrect merge. 2020-05-29 10:50:36 +00:00
kamil acf22f181d Fix the libntp build with Clang/LLVM
Set -Wno-error=implicit-int-float-conversion
2020-05-29 10:47:37 +00:00