Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

compile-flickernoise: fix zlib compile error

  • Loading branch information...
commit dbfef3456ccc8fb7aaa57b59f6e7aace0e66c09b 1 parent 6ec4142
authored August 25, 2011
2  compile-flickernoise/Makefile
@@ -220,6 +220,8 @@ rtems: $(BUILD_DIR)/bsp-milkymist/Makefile
220 220
 
221 221
 $(BUILD_DIR)/bsp-milkymist/Makefile:
222 222
 	mkdir -p $(BUILD_DIR)/bsp-milkymist
  223
+	(cd $(MILKYMIST_GIT_DIR)/rtems.git && patch -Np1 < ${CURDIR}/patches/rtems-0001-zlib-git-cvs-bug.patch)
  224
+	#workaround git cvs bug
223 225
 	(cd $(MILKYMIST_GIT_DIR)/rtems.git && ./bootstrap -c && ./bootstrap -p && ./bootstrap)
224 226
 	(cd $(BUILD_DIR)/bsp-milkymist && ../../$(MILKYMIST_GIT_DIR)/rtems.git/configure $(RTEMS_CONFIGURE_FLAGS))
225 227
 
74  compile-flickernoise/patches/rtems-0001-zlib-git-cvs-bug.patch
... ...
@@ -0,0 +1,74 @@
  1
+diff --git a/cpukit/zlib/zconf.h.in b/cpukit/zlib/zconf.h.in
  2
+index 15b7cfd..beca553 100644
  3
+--- a/cpukit/zlib/zconf.h.in
  4
++++ b/cpukit/zlib/zconf.h.in
  5
+@@ -3,7 +3,7 @@
  6
+  * For conditions of distribution and use, see copyright notice in zlib.h
  7
+  */
  8
+ 
  9
+-/* @(#) $Id: zconf.h.in,v 1.1 2010/02/21 22:38:24 ralf Exp $ */
  10
++/* @(#) $Id: zconf.h.in,v 1.1.1.2 2010/04/18 17:58:06 ralf Exp $ */
  11
+ 
  12
+ #ifndef ZCONF_H
  13
+ #define ZCONF_H
  14
+@@ -315,10 +315,6 @@
  15
+ #  endif
  16
+ #endif
  17
+ 
  18
+-#ifdef HAVE_VISIBILITY_PRAGMA
  19
+-#  define ZEXTERN __attribute__((visibility ("default"))) extern
  20
+-#endif
  21
+-
  22
+ #ifndef ZEXTERN
  23
+ #  define ZEXTERN extern
  24
+ #endif
  25
+@@ -364,8 +360,21 @@ typedef uLong FAR uLongf;
  26
+ #  define Z_HAVE_UNISTD_H
  27
+ #endif
  28
+ 
  29
+-#ifdef Z_HAVE_UNISTD_H
  30
++#ifdef STDC
  31
+ #  include <sys/types.h>    /* for off_t */
  32
++#endif
  33
++
  34
++/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
  35
++ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
  36
++ * though the former does not conform to the LFS document), but considering
  37
++ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
  38
++ * equivalently requesting no 64-bit operations
  39
++ */
  40
++#if -_LARGEFILE64_SOURCE - -1 == 1
  41
++#  undef _LARGEFILE64_SOURCE
  42
++#endif
  43
++
  44
++#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
  45
+ #  include <unistd.h>       /* for SEEK_* and off_t */
  46
+ #  ifdef VMS
  47
+ #    include <unixio.h>     /* for off_t */
  48
+@@ -375,19 +384,22 @@ typedef uLong FAR uLongf;
  49
+ #  endif
  50
+ #endif
  51
+ 
  52
+-#ifdef _LARGEFILE64_SOURCE
  53
+-#  include <sys/types.h>
  54
+-#endif
  55
+-
  56
+ #ifndef SEEK_SET
  57
+ #  define SEEK_SET        0       /* Seek from beginning of file.  */
  58
+ #  define SEEK_CUR        1       /* Seek from current position.  */
  59
+ #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
  60
+ #endif
  61
++
  62
+ #ifndef z_off_t
  63
+ #  define z_off_t long
  64
+ #endif
  65
+ 
  66
++#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
  67
++#  define z_off64_t off64_t
  68
++#else
  69
++#  define z_off64_t z_off_t
  70
++#endif
  71
++
  72
+ #if defined(__OS400__)
  73
+ #  define NO_vsnprintf
  74
+ #endif

0 notes on commit dbfef34

Please sign in to comment.
Something went wrong with that request. Please try again.