Re: Compilation on latest FreeBSD

k via Mailinglist for GNUnet developers <[email protected]> Sat, 6 Sep 2025 10:28:10 +0000
Newsgroups gmane.network.gnunet.devel
Message-ID <[email protected]>
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>Oh you are fast, I meanwhile got it working myself. At the end i
      think you have the same changes as me.<br>
      <br>
      In short the changes were:</p>
    <ol>
      <li>Remove underscore sign from Swap, maybe you need that
        underscore for Linux and not for BSD?</li>
      <li>Added const for a few functions</li>
    </ol>
    <p>But I still have to test it.</p>
    <p>Here my diff:</p>
    <pre>diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 5b68b424c..3dcefd36c 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -161,9 +161,9 @@ enum GNUNET_GenericReturnValue
  */
 
 #if defined(bswap_16) || defined(bswap_32) || defined(bswap_64)
-#define BYTE_SWAP_16(x) bswap_16 (x)
-#define BYTE_SWAP_32(x) bswap_32 (x)
-#define BYTE_SWAP_64(x) bswap_64 (x)
+#define BYTE_SWAP_16(x) bswap16 (x)
+#define BYTE_SWAP_32(x) bswap32 (x)
+#define BYTE_SWAP_64(x) bswap64 (x)
 #else
 #define BYTE_SWAP_16(x) ((((x) &amp; 0x00ff) &lt;&lt; 8) | (((x) &amp; 0xff00) &gt;&gt; 8))
 
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 813651de8..d27a3741a 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -640,7 +640,7 @@ GNUNET_TESTING_cmd_make_unblocking (
  * @param timeout how long to wait at most for @a cmd_ref to finish
  * @return a finish-command.
  */
-struct GNUNET_TESTING_Command
+const struct GNUNET_TESTING_Command
 GNUNET_TESTING_cmd_finish (
   const char *finish_label,
   const char *cmd_ref,
@@ -680,7 +680,7 @@ GNUNET_TESTING_cmd_sleep (
  *
  * @param label Label of the command.
 */
-struct GNUNET_TESTING_Command
+const struct GNUNET_TESTING_Command
 GNUNET_TESTING_cmd_exec (
   const char *label,
   enum GNUNET_OS_ProcessStatusType expected_type,
@@ -693,7 +693,7 @@ GNUNET_TESTING_cmd_exec (
  *
  * @param label Label of the command.
  */
-struct GNUNET_TESTING_Command
+const struct GNUNET_TESTING_Command
 GNUNET_TESTING_cmd_exec_va (
   const char *label,
   enum GNUNET_OS_ProcessStatusType expected_type,

</pre>
    <p><br>
    </p>
    <p><br>
    </p>
  </body>
</html>