ntohl() returns "unsigned long" on win32
authorBernd Petrovitsch <bernd@firmix.at>
Wed, 9 May 2007 17:41:17 +0000 (17:41 +0000)
committerBernd Petrovitsch <bernd@firmix.at>
Wed, 9 May 2007 17:41:17 +0000 (17:41 +0000)
lib/secure/src/olsrd_secure.c

index 84ee404..1ccdfbf 100644 (file)
@@ -33,7 +33,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $Id: olsrd_secure.c,v 1.24 2007/05/09 17:29:53 bernd67 Exp $
+ * $Id: olsrd_secure.c,v 1.25 2007/05/09 17:41:17 bernd67 Exp $
  */
 
 
@@ -752,7 +752,7 @@ parse_cres(char *in_msg)
       return 0;
     }
 
-  olsr_printf(3, "[ENC]Challenge: 0x%lx\n", ntohl(msg->challenge));
+  olsr_printf(3, "[ENC]Challenge: 0x%lx\n", (unsigned long)ntohl(msg->challenge)); /* ntohl() returns a unsignedlong onwin32 */
 
   /* Check signature */
 
@@ -979,7 +979,7 @@ parse_challenge(char *in_msg)
        }
     }
 
-  olsr_printf(3, "[ENC]Challenge: 0x%lx\n", ntohl(msg->challenge));
+  olsr_printf(3, "[ENC]Challenge: 0x%lx\n", (unsigned long)ntohl(msg->challenge)); /* ntohl() returns a unsignedlong onwin32 */
 
   /* Check signature */