浏览代码

core: ensure cfg_block structure is 8 byte aligned

- prevents bus error on stricter cpu architectures like sparc
- reported by GH #655
Spencer Thomason 9 年之前
父节点
当前提交
0fd0715d01
共有 1 个文件被更改,包括 1 次插入0 次删除
  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;