summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2016-05-26 10:02:54 +0100
committerBen Pfaff <blp@ovn.org>2016-05-26 09:43:10 -0700
commitfa54d373d9a368151675383828293028235a4089 (patch)
treeda36a7a292a0369a98435c12e6ac1430a6a77636 /include
parent1a523ec4fb50be3c887e3cdd0ae8b7bf6b4187e6 (diff)
downloadopenvswitch-fa54d373d9a368151675383828293028235a4089.tar.gz
util: Drop 'date' and 'time' arguments from ovs_set_program_name
The 'date' and 'time' arguments are normally being set by 'ovs_set_program_name' using __DATE__ and __TIME__. However, this breaks reproducible builds since even without any changes in the toolchain, build system etc, the end binary will still differ in that regard. This is also visible when building with -Wdate-time: utilities/ovs-dpctl.c:61:29: warning: macro "__DATE__" might prevent reproducible builds [-Wdate-time] set_program_name(argv[0]); ^ and it's also something that triggers the following warning in the openSUSE OBS builds: [...] openvswitch.x86_64: W: file-contains-date-and-time /usr/bin/ovs-ofctl openvswitch.x86_64: W: file-contains-date-and-time /usr/bin/ovs-appctl Your file uses __DATE and __TIME__ this causes the package to rebuild when not needed [...] This patch drops these two arguments from ovs_set_program_name__ and renames the function to ovs_set_program_name dropping the previous preprocessor macro in the process. This finally removes the remaining references to __DATE__ and __TIME__ from the sources which is something that has already been done in commit 26bfaeaa9687 ("Stop using __DATE__ and __TIME__ in startup string.") for the kernel datapath. Cc: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include')
-rw-r--r--include/openvswitch/util.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/openvswitch/util.h b/include/openvswitch/util.h
index 2230b2a0c..363fa39b6 100644
--- a/include/openvswitch/util.h
+++ b/include/openvswitch/util.h
@@ -25,11 +25,7 @@
extern "C" {
#endif
-void ovs_set_program_name__(const char *name, const char *version,
- const char *date, const char *time);
-
-#define ovs_set_program_name(name, version) \
- ovs_set_program_name__(name, version, __DATE__, __TIME__)
+void ovs_set_program_name(const char *name, const char *version);
const char *ovs_get_program_name(void);
const char *ovs_get_program_version(void);