[RFC,1/7] xen: Introduce XEN_COMPILE_POSIX_TIME
diff mbox

Message ID 1499550803-25664-2-git-send-email-daniel.kiper@oracle.com
State New, archived
Headers show

Commit Message

Daniel Kiper July 8, 2017, 9:53 p.m. UTC
We need the POSIX time to properly fill the TimeDateStamp field in the PE header.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 xen/Makefile                 |   14 ++++++++------
 xen/include/xen/compile.h.in |    1 +
 2 files changed, 9 insertions(+), 6 deletions(-)

Patch
diff mbox

diff --git a/xen/Makefile b/xen/Makefile
index f6a6bc2..2424690 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -6,12 +6,13 @@  export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 
-export XEN_WHOAMI	?= $(USER)
-export XEN_DOMAIN	?= $(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))
-export XEN_BUILD_DATE	?= $(shell LC_ALL=C date)
-export XEN_BUILD_TIME	?= $(shell LC_ALL=C date +%T)
-export XEN_BUILD_HOST	?= $(shell hostname)
-export XEN_CONFIG_EXPERT ?= n
+export XEN_WHOAMI		?= $(USER)
+export XEN_DOMAIN		?= $(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))
+export XEN_BUILD_DATE		?= $(shell LC_ALL=C date)
+export XEN_BUILD_TIME		?= $(shell LC_ALL=C date +%T)
+export XEN_BUILD_POSIX_TIME	?= $(shell LC_ALL=C date +%s)
+export XEN_BUILD_HOST		?= $(shell hostname)
+export XEN_CONFIG_EXPERT	?= n
 
 export BASEDIR := $(CURDIR)
 export XEN_ROOT := $(BASEDIR)/..
@@ -164,6 +165,7 @@  delete-unfresh-files:
 include/xen/compile.h: include/xen/compile.h.in .banner
 	@sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \
 	    -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \
+	    -e 's/@@posix_time@@/$(XEN_BUILD_POSIX_TIME)/g' \
 	    -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
 	    -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
 	    -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \
diff --git a/xen/include/xen/compile.h.in b/xen/include/xen/compile.h.in
index 440ecb2..b2ae6f9 100644
--- a/xen/include/xen/compile.h.in
+++ b/xen/include/xen/compile.h.in
@@ -1,5 +1,6 @@ 
 #define XEN_COMPILE_DATE	"@@date@@"
 #define XEN_COMPILE_TIME	"@@time@@"
+#define XEN_COMPILE_POSIX_TIME	@@posix_time@@
 #define XEN_COMPILE_BY		"@@whoami@@"
 #define XEN_COMPILE_DOMAIN	"@@domain@@"
 #define XEN_COMPILE_HOST	"@@hostname@@"