# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../ocfs2-tools/ocfs2-tools-1.2.2-fix-defines.patch # Copyright (C) 2006 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- Submitted by: Christian Wiese (morfoh at opensde dot org) Date: 2006-12-02 Initial Package Version: 1.2.2 Upstream Status: not submitted yet Origin: ocfs2-tools-1.2.2-fix-defines.patch by Christian Wiese made for the Open System Development Environment (OpenSDE - http://opensde.org) Description: ocfs2-tools doesn't compile because the offsetof function is not defined. This patch fixes certain problems discovered while observing the problem described in http://trac.opensde.org/ticket/199. diff -ruN ocfs2-tools-1.2.2/Config.make.in ocfs2-tools-1.2.2-fix-defines/Config.make.in --- ocfs2-tools-1.2.2/Config.make.in 2006-10-19 20:10:53.000000000 +0300 +++ ocfs2-tools-1.2.2-fix-defines/Config.make.in 2006-12-02 18:52:49.000000000 +0200 @@ -44,6 +44,8 @@ AR = @AR@ RANLIB = @RANLIB@ +DEFINES = @DEFINES@ + CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ diff -ruN ocfs2-tools-1.2.2/Preamble.make ocfs2-tools-1.2.2-fix-defines/Preamble.make --- ocfs2-tools-1.2.2/Preamble.make 2006-10-19 20:10:53.000000000 +0300 +++ ocfs2-tools-1.2.2-fix-defines/Preamble.make 2006-12-02 19:07:35.000000000 +0200 @@ -26,7 +26,6 @@ DIST_RULES = INCLUDES = -DEFINES = CFLAGS += $($(subst /,_,$(basename $@))_CFLAGS) CFLAGS += -pipe diff -ruN ocfs2-tools-1.2.2/configure ocfs2-tools-1.2.2-fix-defines/configure --- ocfs2-tools-1.2.2/configure 2006-12-02 18:32:53.000000000 +0200 +++ ocfs2-tools-1.2.2-fix-defines/configure 2006-12-02 19:13:41.000000000 +0200 @@ -309,7 +309,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE MAJOR_VERSION MINOR_VERSION MICRO_VERSION EXTRA_VERSION DIST_VERSION VERSION RPM_VERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB AR EGREP root_prefix root_bindir root_sbindir root_sysconfdir OCFS2_DEBUG PKG_CONFIG COM_ERR_CFLAGS COM_ERR_LIBS UUID_LIBS NCURSES_LIBS READLINE_LIBS OCFS2_DEBUG_EXE OCFS2_DYNAMIC_FSCK OCFS2_DYNAMIC_CTL GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS BUILD_OCFS2CDSL BUILD_DEBUGOCFS2 PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir PYTHON_INCLUDES BLKID_CFLAGS BLKID_LIBS HAVE_BLKID BUILD_OCFS2CONSOLE LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFINES ECHO_C ECHO_N ECHO_T LIBS PACKAGE MAJOR_VERSION MINOR_VERSION MICRO_VERSION EXTRA_VERSION DIST_VERSION VERSION RPM_VERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB AR EGREP root_prefix root_bindir root_sbindir root_sysconfdir OCFS2_DEBUG PKG_CONFIG COM_ERR_CFLAGS COM_ERR_LIBS UUID_LIBS NCURSES_LIBS READLINE_LIBS OCFS2_DEBUG_EXE OCFS2_DYNAMIC_FSCK OCFS2_DYNAMIC_CTL GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS BUILD_OCFS2CDSL BUILD_DEBUGOCFS2 PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir PYTHON_INCLUDES BLKID_CFLAGS BLKID_LIBS HAVE_BLKID BUILD_OCFS2CONSOLE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1161,7 +1161,7 @@ done ac_signal=0 -# confdefs.h avoids OS command line length limits that DEFS can exceed. +# confdefs.h avoids OS command line length limits that DEFINES can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h @@ -3142,8 +3142,8 @@ -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h +for ac_header in sys/types.h sys/stat.h stdlib.h stddef.h string.h memory.h \ + strings.h inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -6766,7 +6766,7 @@ }' fi -# Transform confdefs.h into DEFS. +# Transform confdefs.h into DEFINES. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # @@ -6795,7 +6795,7 @@ # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +DEFINES=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed @@ -7354,7 +7354,7 @@ s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t +s,@DEFINES@,$DEFINES,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t diff -ruN ocfs2-tools-1.2.2/fsck.ocfs2/Makefile ocfs2-tools-1.2.2-fix-defines/fsck.ocfs2/Makefile --- ocfs2-tools-1.2.2/fsck.ocfs2/Makefile 2006-10-19 20:10:45.000000000 +0300 +++ ocfs2-tools-1.2.2-fix-defines/fsck.ocfs2/Makefile 2006-12-02 19:26:02.000000000 +0200 @@ -28,7 +28,7 @@ CFLAGS := $(OPTS) -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -DEFINES = -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES -DO2CB_FLAT_INCLUDES +DEFINES += -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES -DO2CB_FLAT_INCLUDES CFILES = fsck.c \ dirblocks.c \ diff -ruN ocfs2-tools-1.2.2/libocfs2/Makefile ocfs2-tools-1.2.2-fix-defines/libocfs2/Makefile --- ocfs2-tools-1.2.2/libocfs2/Makefile 2006-10-19 20:10:46.000000000 +0300 +++ ocfs2-tools-1.2.2-fix-defines/libocfs2/Makefile 2006-12-02 21:46:50.000000000 +0200 @@ -22,7 +22,7 @@ LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a CFLAGS = $(OPTS) $(WARNINGS) -fPIC -CPPFLAGS += -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES -DO2CB_FLAT_INCLUDES +DEFINES += -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES -DO2CB_FLAT_INCLUDES ifneq ($(OCFS2_DEBUG_EXE),) DEBUG_EXE_FILES = $(shell awk '/DEBUG_EXE/{if (k[FILENAME] == 0) {print FILENAME; k[FILENAME] = 1;}}' $(CFILES)) diff -ruN ocfs2-tools-1.2.2/libocfs2/include/ocfs2.h ocfs2-tools-1.2.2-fix-defines/libocfs2/include/ocfs2.h --- ocfs2-tools-1.2.2/libocfs2/include/ocfs2.h 2006-10-19 20:10:46.000000000 +0300 +++ ocfs2-tools-1.2.2-fix-defines/libocfs2/include/ocfs2.h 2006-12-02 22:09:47.000000000 +0200 @@ -34,7 +34,22 @@ # define _LARGEFILE64_SOURCE #endif +#ifdef HAVE_STDIO_H #include +#endif + +#if defined(STDC_HEADERS) +# include +# include +#else +# if defined(HAVE_STDLIB_H) +# include +# endif +# if defined(HAVE_STDDEF_H) +# include +# endif +#endif + #include #include #include diff -ruN ocfs2-tools-1.2.2/listuuid/Makefile ocfs2-tools-1.2.2-fix-defines/listuuid/Makefile --- ocfs2-tools-1.2.2/listuuid/Makefile 2006-10-19 20:10:46.000000000 +0300 +++ ocfs2-tools-1.2.2-fix-defines/listuuid/Makefile 2006-12-02 19:29:49.000000000 +0200 @@ -25,7 +25,7 @@ CFLAGS := $(OPTS) -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -DEFINES = -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES -DO2CB_FLAT_INCLUDES +DEFINES += -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES -DO2CB_FLAT_INCLUDES UNINST_PROGRAMS = listuuid diff -ruN ocfs2-tools-1.2.2/mount.ocfs2/Makefile ocfs2-tools-1.2.2-fix-defines/mount.ocfs2/Makefile --- ocfs2-tools-1.2.2/mount.ocfs2/Makefile 2006-10-19 20:10:46.000000000 +0300 +++ ocfs2-tools-1.2.2-fix-defines/mount.ocfs2/Makefile 2006-12-02 19:28:35.000000000 +0200 @@ -23,7 +23,7 @@ CFLAGS := $(OPTS) -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -DEFINES = -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES \ +DEFINES += -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES \ -DO2CB_FLAT_INCLUDES -DVERSION=\"$(VERSION)\" CFILES = opts.c mount.ocfs2.c diff -ruN ocfs2-tools-1.2.2/ocfs2_hb_ctl/Makefile ocfs2-tools-1.2.2-fix-defines/ocfs2_hb_ctl/Makefile --- ocfs2-tools-1.2.2/ocfs2_hb_ctl/Makefile 2006-10-19 20:10:46.000000000 +0300 +++ ocfs2-tools-1.2.2-fix-defines/ocfs2_hb_ctl/Makefile 2006-12-02 19:27:10.000000000 +0200 @@ -27,7 +27,7 @@ CFLAGS := $(OPTS) -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -DEFINES = -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES \ +DEFINES += -DOCFS2_FLAT_INCLUDES -DO2DLM_FLAT_INCLUDES \ -DO2CB_FLAT_INCLUDES -DVERSION=\"$(VERSION)\" CFILES = ocfs2_hb_ctl.c diff -ruN ocfs2-tools-1.2.2/sizetest/Makefile ocfs2-tools-1.2.2-fix-defines/sizetest/Makefile --- ocfs2-tools-1.2.2/sizetest/Makefile 2006-10-19 20:10:49.000000000 +0300 +++ ocfs2-tools-1.2.2-fix-defines/sizetest/Makefile 2006-12-02 19:31:00.000000000 +0200 @@ -16,7 +16,7 @@ UNINST_PROGRAMS = sizetest.ocfs2 INCLUDES = -I$(TOPDIR)/libocfs2/include -I$(TOPDIR)/libo2dlm/include -I$(TOPDIR)/libo2cb/include -DEFINES = -DOCFS2_FLAT_INCLUDES -DVERSION=\"$(VERSION)\" -DO2DLM_FLAT_INCLUDES -DO2CB_FLAT_INCLUDES +DEFINES += -DOCFS2_FLAT_INCLUDES -DVERSION=\"$(VERSION)\" -DO2DLM_FLAT_INCLUDES -DO2CB_FLAT_INCLUDES CFILES = sizetest.c OBJS = $(subst .c,.o,$(CFILES))