[Git][NTPsec/ntpsec][master] Force struct pkt to maximum alignment on the host machine.

Eric S. Raymond gitlab at mg.gitlab.com
Tue Sep 5 21:41:30 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
2ab2f5ff by Eric S. Raymond at 2017-09-05T17:39:19-04:00
Force struct pkt to maximum alignment on the host machine.

Intended to prevent 'cast increases required alignment of target type/
on 32-bit machines.

- - - - -


1 changed file:

- include/ntp.h


Changes:

=====================================
include/ntp.h
=====================================
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -451,7 +451,7 @@ struct pkt {
 #define	MAX_MAC_LEN	(6 * sizeof(uint32_t))	/* SHA */
 
 	uint32_t	exten[(MAX_MAC_LEN) / sizeof(uint32_t)];
-};
+} __attribute__ ((aligned));
 
 /* pythonize-header: stop ignoring */
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/2ab2f5ff15f4030451e3d714ef1bf74f2ec1b122

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/2ab2f5ff15f4030451e3d714ef1bf74f2ec1b122
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170905/39cd669c/attachment.html>


More information about the vc mailing list