php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #51583
Patch mysqlnd_net-align-20100417a.patch revision 2010-04-17 15:46 UTC by rainer dot jung at kippdata dot de

Patch mysqlnd_net-align-20100417a.patch for MySQL related Bug #51583

Patch version 2010-04-17 15:46 UTC

Return to Bug #51583 | Download this patch
Patch Revisions:

Developer: rainer.jung@kippdata.de

Index: ext/mysqlnd/mysqlnd_net.c
===================================================================
--- ext/mysqlnd/mysqlnd_net.c	(revision 298114)
+++ ext/mysqlnd/mysqlnd_net.c	(working copy)
@@ -195,7 +195,12 @@
 
 
 /* We assume that MYSQLND_HEADER_SIZE is 4 bytes !! */
-#define STORE_HEADER_SIZE(safe_storage, buffer)  int4store((safe_storage), (*(uint32_t *)(buffer)))
+#define COPY_HEADER(T,A)  do { \
+		*(((char *)(T)))   = *(((char *)(A)));\
+		*(((char *)(T))+1) = *(((char *)(A))+1);\
+		*(((char *)(T))+2) = *(((char *)(A))+2);\
+		*(((char *)(T))+3) = *(((char *)(A))+3); } while (0)
+#define STORE_HEADER_SIZE(safe_storage, buffer)  COPY_HEADER((safe_storage), (buffer))
 #define RESTORE_HEADER_SIZE(buffer, safe_storage) STORE_HEADER_SIZE((safe_storage), (buffer))
 
 /* {{{ mysqlnd_net::send */
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC