Commit 0e8c2c9e authored by Stephen Morris's avatar Stephen Morris

[1593-sun] Fix errors on Sun build

Sunstudio could not find memset() in cstring; changed the include to
that of "string.h".  Also it complained of an anachronism in using
"extern int close()" as a default argument.  Removed these.
parent aacfc3fe
......@@ -24,7 +24,7 @@ main() {
* but ability to bind ports? It would be nice.
*/
try {
run(STDIN_FILENO, STDOUT_FILENO);
run(STDIN_FILENO, STDOUT_FILENO, getSock, isc::util::io::send_fd, close);
} catch (const SocketCreatorError& ec) {
return (ec.getExitCode());
}
......
......@@ -18,7 +18,7 @@
#include <util/io/sockaddr_util.h>
#include <cerrno>
#include <cstring>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
......@@ -216,8 +216,8 @@ getSock(const int type, struct sockaddr* bind_addr, const socklen_t addr_len) {
// Main run loop.
void
run(const int input_fd, const int output_fd, const get_sock_t get_sock,
const send_fd_t send_fd_fun, const close_t close_fun)
run(const int input_fd, const int output_fd, get_sock_t get_sock,
send_fd_t send_fd_fun, close_t close_fun)
{
for (;;) {
char command;
......
......@@ -135,10 +135,8 @@ typedef int (*close_t)(int);
/// \exception isc::socket_creator::ProtocolError Unrecognised command received
/// \exception isc::socket_creator::InternalError Other error
void
run(const int input_fd, const int output_fd,
const get_sock_t get_sock_fun = getSock,
const send_fd_t send_fd_fun = isc::util::io::send_fd,
const close_t close_fun = close);
run(const int input_fd, const int output_fd, get_sock_t get_sock_fun,
send_fd_t send_fd_fun, close_t close_fun);
} // namespace socket_creator
} // NAMESPACE ISC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment