From 4a949318b7a3279057101329445337be6b7640cb Mon Sep 17 00:00:00 2001
From: Michele Calgaro <michele.calgaro@yahoo.it>
Date: Mon, 10 Nov 2025 22:01:48 +0900
Subject: Fix FTBFS caused by wrong function prototype. This resolves issue #24

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
---
 libkdcraw/libraw/samples/half_mt.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/libkdcraw/libraw/samples/half_mt.c b/libkdcraw/libraw/samples/half_mt.c
index 8f91b8f..e44cd55 100644
--- a/libkdcraw/libraw/samples/half_mt.c
+++ b/libkdcraw/libraw/samples/half_mt.c
@@ -35,7 +35,7 @@
             if(LIBRAW_FATAL_ERROR(ret))                         \
                 {                                               \
                     libraw_close(iprc);                         \
-                    return -1;                                   \
+                    return (void*)-1;                           \
                 }                                               \
         }                                                       \
     }while(0)
@@ -62,7 +62,7 @@ char *get_next_file()
 
 
 // thread routine
-int process_files(void *q)
+void* process_files(void *q)
 {
     int ret;
     int count=0;
@@ -72,7 +72,7 @@ int process_files(void *q)
     if(!iprc)
         {
             fprintf(stderr,"Cannot create libraw handle\n");
-            return -1;
+            return (void*)-1;
         }
 
     while((fn = get_next_file()))
@@ -101,7 +101,7 @@ int process_files(void *q)
             count++;
         }
     libraw_close(iprc);
-    return count;
+    return (void*)count;
 }
 
 void usage(const char*p)
@@ -165,12 +165,12 @@ int main(int ac, char *av[])
         pthread_create(&threads[i],NULL,process_files,NULL);
     for(i=0;i<max_threads;i++)
         {
-            int *iptr;
+            void *vptr;
             if(threads[i])
                 {
-                    pthread_join(threads[i],&iptr);
-                    if(iptr)
-                        printf("Thread %d : %d files\n",i,(int)iptr);
+                    pthread_join(threads[i],&vptr);
+                    if(vptr)
+                        printf("Thread %d : %d files\n",i,(int)vptr);
                 }
         }
             
-- 
cgit v1.2.3

