diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-03-14 20:29:00 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-03-14 20:29:00 +0100 |
commit | f987f4b3e28b24fd3e58408c568b688ad1306766 (patch) | |
tree | 7383075323b8a1aa5a70ec0d1b770a59b703be92 | |
parent | 2970d6c30b1f57e9a75d46982378b103899bddbc (diff) |
FreeBSD complation error fixed
There was an error in pgm_receiver wrt strict aliasing.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r-- | src/pgm_receiver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp index 6b8829e..bb79ece 100644 --- a/src/pgm_receiver.cpp +++ b/src/pgm_receiver.cpp @@ -151,7 +151,10 @@ void zmq::pgm_receiver_t::in_event () while (true) { // Get new batch of data. - ssize_t received = pgm_socket.receive ((void**) &data, &tsi); + // Note the workaround made not to break strict-aliasing rules. + void *tmp = NULL; + ssize_t received = pgm_socket.receive (&tmp, &tsi); + data = (unsigned char*) tmp; // No data to process. This may happen if the packet received is // neither ODATA nor ODATA. |