diff --git a/src/c_client.py b/src/c_client.py
index 19c8015..e844d90 100755
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -321,7 +321,7 @@ def _c_iterator(self, name):
     _h('/**')
     _h(' * @brief %s', self.c_iterator_type)
     _h(' **/')
-    _h('typedef struct %s {', self.c_iterator_type)
+    _h('typedef struct %s _XCB_PACKED {', self.c_iterator_type)
     _h('    %s *data; /**<  */', self.c_type)
     _h('    int%s rem; /**<  */', ' ' * (len(self.c_type) - 2))
     _h('    int%s index; /**<  */', ' ' * (len(self.c_type) - 2))
@@ -630,7 +630,7 @@ def _c_complex(self):
     _h('/**')
     _h(' * @brief %s', self.c_type)
     _h(' **/')
-    _h('typedef %s %s {', self.c_container, self.c_type)
+    _h('typedef %s %s _XCB_PACKED {', self.c_container, self.c_type)
 
     struct_fields = []
     maxtypelen = 0
