Thread (30 messages) 30 messages, 2 authors, 2015-10-07

[PATCH 19/28] fm10k: Fix Solaris build issue

flat view
STALE4023d

From: Wang Xiao W <hidden>
Date: 2015-09-10 04:39:28
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Solaris (and other OS's) are not C99 compliant, so they are not able
to use the C99 style #pragma pack() code. Wrap with C99 tag for easy
stripping.

Signed-off-by: Wang Xiao W <redacted>
---
 drivers/net/fm10k/base/fm10k_pf.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/drivers/net/fm10k/base/fm10k_pf.h b/drivers/net/fm10k/base/fm10k_pf.h
index b7a1758..af873d1 100644
--- a/drivers/net/fm10k/base/fm10k_pf.h
+++ b/drivers/net/fm10k/base/fm10k_pf.h
@@ -94,7 +94,11 @@ enum fm10k_pf_tlv_attr_id_v1 {
  * messages, and must not have gaps between their values. They must line up
  * correctly to the TLV definition.
  */
+#ifdef C99
 #pragma pack(push, 1)
+#else
+#pragma pack(1)
+#endif /* C99 */
 
 struct fm10k_mac_update {
 	__le32	mac_lower;
@@ -130,7 +134,11 @@ struct fm10k_swapi_tx_timestamp_mode {
 	__le32 status;
 };
 
+#ifdef C99
 #pragma pack(pop)
+#else
+#pragma pack()
+#endif /* C99 */
 
 #define FM10K_PF_MSG_LPORT_CREATE_HANDLER(func) \
 	FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_LPORT_CREATE, NULL, func)
-- 
1.9.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help