poorbarcode opened a new pull request, #4665: URL: https://github.com/apache/bookkeeper/pull/4665
### Motivation https://github.com/apache/bookkeeper/actions/runs/17647901080/job/50151556235?pr=4613 ``` [INFO] OUTPUT>native-io-jni/cpp/native_io_jni.c: In function 'Java_org_apache_bookkeeper_common_util_nativeio_NativeIOJni_fsync': Error: OUTPUT>native-io-jni/cpp/native_io_jni.c:168:21: error: passing argument 1 of 'fflush' makes pointer from integer without a cast [-Wint-conversion] [INFO] OUTPUT> 168 | int res = fsync(fd); [INFO] OUTPUT> | ^~ [INFO] OUTPUT> | | [INFO] OUTPUT> | jint {aka long int} [INFO] OUTPUT>native-io-jni/cpp/native_io_jni.c:33:26: note: in definition of macro 'fsync' [INFO] OUTPUT> 33 | #define fsync(fd) fflush(fd) [INFO] OUTPUT> | ^~ [INFO] OUTPUT>In file included from C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.28-6\x64\include/jni.h:39, [INFO] OUTPUT> from D:\a\bookkeeper\bookkeeper\native-io\target\nar\javah-include/org_apache_bookkeeper_common_util_nativeio_NativeIOJni.h:2, [INFO] OUTPUT> from native-io-jni/cpp/native_io_jni.c:29: [INFO] OUTPUT>C:/mingw64/x86_64-w64-mingw32/include/stdio.h:635:28: note: expected 'FILE *' {aka 'struct _iobuf *'} but argument is of type 'jint' {aka 'long int'} [INFO] OUTPUT> 635 | int __cdecl fflush(FILE *_File); [INFO] OUTPUT> | ~~~~~~^~~~~ [INFO] OUTPUT>native-io-jni/cpp/native_io_jni.c: In function 'Java_org_apache_bookkeeper_common_util_nativeio_NativeIOJni_pwrite': [INFO] OUTPUT>native-io-jni/cpp/native_io_jni.c:261:26: warning: passing argument 2 of 'pwrite' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] [INFO] OUTPUT> 261 | int res = pwrite(fd, (const void*) pointer, count, offset); [INFO] OUTPUT> | ^~~~~~~~~~~~~~~~~~~~~ [INFO] OUTPUT>native-io-jni/cpp/native_io_jni.c:49:38: note: expected 'void *' but argument is of type 'const void *' [INFO] OUTPUT> 49 | static ssize_t pwrite (int fd, void *buf, size_t count, off_t offset) [INFO] OUTPUT> | ~~~~~~^~~ [INFO] OUTPUT>native-io-jni/cpp/native_io_jni.c: In function 'Java_org_apache_bookkeeper_common_util_nativeio_NativeIOJni_free': [INFO] OUTPUT>native-io-jni/cpp/native_io_jni.c:311:11: warning: passing argument 1 of 'free' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] [INFO] OUTPUT> 311 | free((const void*) pointer); [INFO] OUTPUT> | ^~~~~~~~~~~~~~~~~~~~~ [INFO] OUTPUT>In file included from native-io-jni/cpp/native_io_jni.c:25: [INFO] OUTPUT>C:/mingw64/x86_64-w64-mingw32/include/stdlib.h:537:27: note: expected 'void *' but argument is of type 'const void *' [INFO] OUTPUT> 537 | void __cdecl free(void *_Memory); [INFO] OUTPUT> | ~~~~~~^~~~~~~ ``` the file `native-io-jni/cpp/native_io_jni.c` failed compile in the CI when using `JdK11` & `windows` ### Changes Add compitibility support for windows -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
