Skip to content

Commit a2bbb5e

Browse files
committed
fix imports
1 parent 4906878 commit a2bbb5e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/call_java.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include <jni.h>
22
#include <sqlite3ext.h>
3+
#include <string.h>
4+
35
SQLITE_EXTENSION_INIT1
46

57
JavaVM* gJvm = NULL; // Stored from JNI_OnLoad

src/network.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
// Created by Marco Bambini on 12/12/24.
66
//
77

8-
extern const char* call_https_java(JNIEnv* env); // Declare your JNI function
9-
extern JNIEnv* getEnv(); // Declare getEnv from call_java.c
10-
118
#ifndef CLOUDSYNC_OMIT_NETWORK
129

1310
#include <stdint.h>
@@ -17,6 +14,11 @@ extern JNIEnv* getEnv(); // Declare getEnv from call_ja
1714
#include "curl/curl.h"
1815
#include <stdio.h>
1916
#include <android/log.h>
17+
#include <jni.h>
18+
#include <stdlib.h>
19+
20+
extern const char* call_https_java(JNIEnv* env); // Declare your JNI function
21+
extern JNIEnv* getEnv();
2022

2123
#define CLOUDSYNC_ENDPOINT_PREFIX "v1/cloudsync"
2224
#define CLOUDSYNC_ENDPOINT_UPLOAD "upload"
@@ -456,7 +458,7 @@ void cloudsync_network_init (sqlite3_context *context, int argc, sqlite3_value *
456458

457459
JNIEnv* env = getEnv();
458460
if (!env) {
459-
sqlite3_result_error(context, "Could not get JNIEnv");
461+
sqlite3_result_error(context, "Could not get JNIEnv", -1);
460462
return;
461463
}
462464

0 commit comments

Comments
 (0)