From b2be20597ca0f18202f9d96f4386fbb56bbde2f8 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Sun, 4 Dec 2005 09:57:09 +0000 Subject: [PATCH] Oops, the bug is still here, but reimplement the cpp(1) conditional properly. --- sys/gnu/fs/reiserfs/reiserfs_fs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/gnu/fs/reiserfs/reiserfs_fs.h b/sys/gnu/fs/reiserfs/reiserfs_fs.h index 1046f29971e2..691f612a7305 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_fs.h +++ b/sys/gnu/fs/reiserfs/reiserfs_fs.h @@ -1015,8 +1015,17 @@ struct path { #define pos_in_item(path) ((path)->pos_in_item) +#ifdef __amd64__ +/* To workaround a bug in gcc. He generates a call to memset() which + * is a inline function; this causes a compile time error. */ +#define INITIALIZE_PATH(var) \ + struct path var; \ + bzero(&var, sizeof(var)); \ + var.path_length = ILLEGAL_PATH_ELEMENT_OFFSET; +#else #define INITIALIZE_PATH(var) \ struct path var = { ILLEGAL_PATH_ELEMENT_OFFSET, } +#endif /* Get path element by path and path position. */ #define PATH_OFFSET_PELEMENT(p_s_path, n_offset) \