PSPLINK - compile problem with new toolchain [FIX]

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
anhanguera
Posts: 31
Joined: Thu Aug 26, 2004 4:20 pm

PSPLINK - compile problem with new toolchain [FIX]

Post by anhanguera »

hi,

thank you for such a nice tool. it runs perfect on FW.150 using usbhostfs. here is the small patch;

Code: Select all

Index: usbhostfs/main.c
===================================================================
--- usbhostfs/main.c    (revision 2234)
+++ usbhostfs/main.c    (working copy)
@@ -459,8 +459,8 @@
 }

 /* Exchange a HOSTFS command with the PC host */
-int command_xchg(void *outcmd, int outcmdlen, void *incmd, int incmdlen, const void *outdata,
-               int outlen, void *indata, int inlen)
+int32_t command_xchg(void *outcmd, int32_t outcmdlen, void *incmd, int32_t incmdlen, const void *outdata,
+               int32_t outlen, void *indata, int32_t inlen)
 {
        struct HostFsCmd *cmd;
        struct HostFsCmd *resp;
@@ -485,7 +485,7 @@
                        err = write_data(outcmd, outcmdlen);
                        if(err != outcmdlen)
                        {
-                               MODPRINTF("Error writing command %08X %d\n", cmd->command, err);
+                               MODPRINTF("Error writing command %08X %d\n", (unsigned int) cmd->command, err);
                                break;
                        }
                }
@@ -495,7 +495,7 @@
                        err = write_data(outdata, outlen);
                        if(err != outlen)
                        {
-                               MODPRINTF("Error writing command data %08X, %d\n", cmd->command, err);
+                               MODPRINTF("Error writing command data %08X, %d\n", (unsigned int) cmd->command, err);
                                break;
                        }
                }
@@ -505,18 +505,18 @@
                        err = read_data(incmd, incmdlen);
                        if(err != incmdlen)
                        {
-                               MODPRINTF("Error reading response for %08X %d\n", cmd->command, err);
+                               MODPRINTF("Error reading response for %08X %d\n", (unsigned int) cmd->command, err);
                                break;
                        }

                        if((resp->magic != HOSTFS_MAGIC) && (resp->command != cmd->command))
                        {
-                               MODPRINTF("Invalid response packet magic: %08X, command: %08X\n", resp->magic, resp->command);
+                               MODPRINTF("Invalid response packet magic: %08X, command: %08X\n", (unsigned int) resp->magic, (unsigned int) resp->command);
                                break;
                        }

                        DEBUG_PRINTF("resp->magic %08X, resp->command %08X, resp->extralen %d\n",
-                                       resp->magic, resp->command, resp->extralen);
+                                       (unsigned int) resp->magic, (unsigned int) resp->command, resp->extralen);

                        /* TODO: Should add checks for inlen being less that extra len */
                        if((resp->extralen > 0) && (inlen > 0))
@@ -524,7 +524,7 @@
                                err = read_data(indata, resp->extralen);
                                if(err != resp->extralen)
                                {
-                                       MODPRINTF("Error reading input data %08X, %d\n", cmd->command, err);
+                                       MODPRINTF("Error reading input data %08X, %d\n", (unsigned int) cmd->command, err);
                                        break;
                                }
                        }
@@ -617,7 +617,7 @@
 }

 /* Call to ensure we are connected to the USB host */
-int usb_connected(void)
+int32_t usb_connected(void)
 {
        return g_connected;
 }
Index: usbhostfs/host_driver.c
===================================================================
--- usbhostfs/host_driver.c     (revision 2234)
+++ usbhostfs/host_driver.c     (working copy)
@@ -1034,7 +1034,7 @@
        "host", 0x10, 0x800, "HOST", &host_funcs
 };

-int hostfs_init(void)
+int32_t hostfs_init(void)
 {
        int ret;

anhanguera.
Post Reply