Pragma pack doesn't guarantee there will be no spaces; at best it means the compiler will pack stuff as much as it can. My suggestion is to re-order the items in your struct from largest to smallest; although there's no guarantee (pragmas are, by definition, implementation dependent,) empirically, that usually will get rid of the 'holes' in your structure packing.
There may be other compiler flags that you can use, but if you don't care about the order of items in your struct, ordering from largest to smallest usually does the trick in a more portable(-ish) way.
(obviously this isn't always an option - e.g. if you're trying to full in a structure that goes over the wire or gets passed to some API. But it works for internal storage)