Skip to content

Commit ca20de2

Browse files
[mysql] Fix compilation. (#686)
1 parent 2ba25ce commit ca20de2

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

libs/mysql/my_api.c

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2121
* DEALINGS IN THE SOFTWARE.
2222
*/
23+
#define _GNU_SOURCE
2324
#include <stdlib.h>
2425
#include <memory.h>
2526
#include <stdio.h>

libs/mysql/socket.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2020
* DEALINGS IN THE SOFTWARE.
2121
*/
22+
#define _GNU_SOURCE
2223
#include "socket.h"
2324
#include <string.h>
2425

@@ -29,7 +30,6 @@
2930
# define HANDLE_EINTR(x)
3031

3132
#else
32-
# define _GNU_SOURCE
3333
# include <sys/types.h>
3434
# include <sys/socket.h>
3535
# include <sys/time.h>

libs/sqlite/sqlite.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ HL_PRIM sqlite_result *HL_NAME(request)(sqlite_database *db, vbyte *sql ) {
117117
r->finalize = HL_NAME(finalize_result);
118118
r->db = NULL;
119119

120-
if( sqlite3_prepare16_v2(db->db, sql, -1, &r->r, &tl) != SQLITE_OK ) {
120+
if( sqlite3_prepare16_v2(db->db, sql, -1, &r->r, (const void**)&tl) != SQLITE_OK ) {
121121
HL_NAME(error)(db->db, false);
122122
}
123123

0 commit comments

Comments
 (0)