zoukankan      html  css  js  c++  java
  • 安装php5.4.10时, 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员

    安装php5.4.10时, 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员

    在安装php时,报如下错误

    In file included from /kk/php-5.4.0/ext/gd/gd.c:103:

    /kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putc’:

    /kk/php-5.4.0/ext/gd/gd_ctx.c:51: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

    /kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_putbuf’:

    /kk/php-5.4.0/ext/gd/gd_ctx.c:58: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

    /kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_stream_ctxfree’:

    /kk/php-5.4.0/ext/gd/gd_ctx.c:67: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

    /kk/php-5.4.0/ext/gd/gd_ctx.c:68: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

    /kk/php-5.4.0/ext/gd/gd_ctx.c:69: 错误:‘struct gdIOCtx’ 没有名为 ‘data’ 的成员

    /kk/php-5.4.0/ext/gd/gd_ctx.c: In function ‘_php_image_output_ctx’:

    /kk/php-5.4.0/ext/gd/gd_ctx.c:153: 错误:‘gdIOCtx’ 没有名为 ‘data’ 的成员

    make: *** [ext/gd/gd.lo] 错误 1

    好像说这个错误算是php5.4的bug,下面对应的两篇文章有对应的说明:
    https://bugs.php.net/bug.php?id=55224
    https://bugs.php.net/bug.php?id=60108

    解决方法

    vi <gd_dir>/include/gd_io.h

    gdIOCtx结构中增加void *data;

    格式如下

     typedef struct gdIOCtx

    {

      int (*getC) (struct gdIOCtx *);

      int (*getBuf) (struct gdIOCtx *, void *, int);

      void (*putC) (struct gdIOCtx *, int);

      int (*putBuf) (struct gdIOCtx *, const void *, int);

      /* seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */

      int (*seek) (struct gdIOCtx *, const int);

      long (*tell) (struct gdIOCtx *);

      void (*gd_free) (struct gdIOCtx *);

      void (*data);//增加此项

    }

    gdIOCtx;

  • 相关阅读:
    采坑总结01
    Django设置联合唯一约束 -- migrate时报错处理
    Web前端开发资源整理
    kindEditor 使用
    Django模版语言自定义标签-实现前端 关联组合过滤查询
    django views视图函数返回值 return redirect httpresponse总结
    前端图片实现以瀑布流样式显示
    性能优化中CPU、内存、磁盘IO、网络性能的依赖(转)
    几种浏览器内核(百度百科)
    特殊格式文件(视频、声音等) 在数据库中的存储方式
  • 原文地址:https://www.cnblogs.com/geniusxjq/p/4095045.html
Copyright © 2011-2022 走看看