Explorar o código

core: ensure cfg_block structure is 8 byte aligned

- prevents bus error on stricter cpu architectures like sparc
- reported by GH #655
Spencer Thomason %!s(int64=9) %!d(string=hai) anos
pai
achega
0fd0715d01
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      cfg/cfg_struct.h

+ 1 - 0
cfg/cfg_struct.h

@@ -129,6 +129,7 @@ typedef struct _cfg_block {
 	atomic_t	refcnt;		/*!< reference counter,
 					the block is automatically deleted
 					when it reaches 0 */
+	int		_pad;		/*!< force 8 byte alignment */
 	unsigned char	vars[1];	/*!< blob that contains the values */
 } cfg_block_t;