[zeromq-dev] HP-UX compile.

Martin Sustrik sustrik at fastmq.com
Mon Nov 17 09:00:10 CET 2008


Hi George,

We don't have HP-UX here so it would be helpful if you can check 
following changes and let us know whether they help to get rid of the 
warnings:

> "/home/gneill/zmq/trunk/zmq/ip.cpp", line 205: warning #4232-D: conversion
>           from "sockaddr *" to a more strictly aligned type "sockaddr_in *"
>           may cause misaligned access
>       *addr_ = *((sockaddr_in *) res->ai_addr);

Copying the memory explicitly may help here:

memcpy (addr_, res->ai_addr, sizeof (sockaddr_in));

> 
> "/home/gneill/zmq/trunk/zmq/select_thread.cpp", line 243: warning #2940-D:
>           missing return statement at end of non-void function
>           "zmq::select_thread_t::process_command"
>   }

I would say the compiler doesn't recognise "assert (false)" as a 
termination statement. Try this:

default:
     assert (false);
     return false;

> Also, it looks like there might be some issues using getaddrinfo() on
> HPUX.  (http://www.openldap.org/faq/data/cache/778.html)

Is there a different way to convert hostname to IP address on HP-UX? If 
so, the code may be placed here with #ifdef ZMQ_HAVE_HPUX...

Martin



More information about the zeromq-dev mailing list