OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../fcgi/fcgi-2.4.0-clientdata-pointer.patch
  5. # Copyright (C) 2013 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Index: fcgi-2.4.0/cgi-fcgi/cgi-fcgi.c
  17. ===================================================================
  18. --- fcgi-2.4.0.orig/cgi-fcgi/cgi-fcgi.c
  19. +++ fcgi-2.4.0/cgi-fcgi/cgi-fcgi.c
  20. @@ -21,6 +21,7 @@ static const char rcsid[] = "$Id: cgi-fc
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23. #include <string.h>
  24. +#include <sys/types.h>
  25. #include "fcgi_config.h"
  26. @@ -145,7 +146,7 @@ static FCGI_BeginRequestBody MakeBeginRe
  27. static int bytesToRead; /* number of bytes to read from Web Server */
  28. -static int appServerSock = -1; /* Socket connected to FastCGI application,
  29. +static size_t appServerSock = -1; /* Socket connected to FastCGI application,
  30. * used by AppServerReadHandler and
  31. * AppServerWriteHandler. */
  32. static Buffer fromAS; /* Bytes read from the FCGI application server. */
  33. @@ -640,7 +641,7 @@ static int ParseArgs(int argc, char *arg
  34. }
  35. if((av[ac] = (char *)malloc(strlen(tp1)+1)) == NULL) {
  36. fprintf(stderr, "Cannot allocate %d bytes\n",
  37. - strlen(tp1)+1);
  38. + (int)strlen(tp1)+1);
  39. exit(-1);
  40. }
  41. strcpy(av[ac++], tp1);
  42. Index: fcgi-2.4.0/examples/threaded.c
  43. ===================================================================
  44. --- fcgi-2.4.0.orig/examples/threaded.c
  45. +++ fcgi-2.4.0/examples/threaded.c
  46. @@ -24,7 +24,7 @@ static int counts[THREAD_COUNT];
  47. static void *doit(void *a)
  48. {
  49. - int rc, i, thread_id = (int)a;
  50. + size_t rc, i, thread_id = (size_t)a;
  51. pid_t pid = getpid();
  52. FCGX_Request request;
  53. char *server_name;
  54. @@ -53,7 +53,7 @@ static void *doit(void *a)
  55. "<h1>FastCGI Hello! (multi-threaded C, fcgiapp library)</h1>"
  56. "Thread %d, Process %ld<p>"
  57. "Request counts for %d threads running on host <i>%s</i><p><code>",
  58. - thread_id, pid, THREAD_COUNT, server_name ? server_name : "?");
  59. + (int)thread_id, pid, THREAD_COUNT, server_name ? server_name : "?");
  60. sleep(2);
  61. @@ -71,7 +71,7 @@ static void *doit(void *a)
  62. int main(void)
  63. {
  64. - int i;
  65. + size_t i;
  66. pthread_t id[THREAD_COUNT];
  67. FCGX_Init();
  68. Index: fcgi-2.4.0/include/fcgios.h
  69. ===================================================================
  70. --- fcgi-2.4.0.orig/include/fcgios.h
  71. +++ fcgi-2.4.0/include/fcgios.h
  72. @@ -93,7 +93,7 @@ extern "C" {
  73. # if defined(__STDC__) || defined(__cplusplus)
  74. typedef void *ClientData;
  75. # else
  76. - typedef int *ClientData;
  77. + typedef size_t *ClientData;
  78. # endif /* __STDC__ */
  79. #define _CLIENTDATA
  80. #endif
  81. Index: fcgi-2.4.0/libfcgi/os_unix.c
  82. ===================================================================
  83. --- fcgi-2.4.0.orig/libfcgi/os_unix.c
  84. +++ fcgi-2.4.0/libfcgi/os_unix.c
  85. @@ -1155,7 +1155,7 @@ int OS_Accept(int listen_sock, int fail_
  86. for (;;) {
  87. do {
  88. -#ifdef HAVE_SOCKLEN
  89. +#ifdef HAVE_SYS_SOCKET_H
  90. socklen_t len = sizeof(sa);
  91. #else
  92. int len = sizeof(sa);
  93. @@ -1255,7 +1255,7 @@ int OS_IsFcgi(int sock)
  94. struct sockaddr_in in;
  95. struct sockaddr_un un;
  96. } sa;
  97. -#ifdef HAVE_SOCKLEN
  98. +#ifdef HAVE_SYS_SOCKET_H
  99. socklen_t len = sizeof(sa);
  100. #else
  101. int len = sizeof(sa);