Opened 9 years ago

Closed 9 years ago

#270 closed defect (fixed)

need unistd.h included on sunstudio

Reported by: jreed Owned by: jreed
Priority: medium Milestone: 06. 4th Incremental Release
Component: xfrout Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: Add Hours to Ticket:
Total Hours: Internal?:

Description

Index: src/lib/xfr/fd_share.cc
===================================================================
--- src/lib/xfr/fd_share.cc	(revision 2387)
+++ src/lib/xfr/fd_share.cc	(working copy)
@@ -20,6 +20,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/uio.h>
+#include <stdlib.h>             // for malloc and free
 #include "fd_share.h"
 
 namespace isc {
Index: src/lib/xfr/xfrout_client.cc
===================================================================
--- src/lib/xfr/xfrout_client.cc	(revision 2387)
+++ src/lib/xfr/xfrout_client.cc	(working copy)
@@ -18,6 +18,8 @@
 #include <cstring>
 #include <iostream>
 
+// for some IPC/network system calls in asio/detail/pipe_select_interrupter.hpp
+#include <unistd.h>
 #include <asio.hpp>
 
 #include "fd_share.h"
Index: src/lib/cc/session_unittests.cc
===================================================================
--- src/lib/cc/session_unittests.cc	(revision 2387)
+++ src/lib/cc/session_unittests.cc	(working copy)
@@ -16,6 +16,8 @@
 
 #include "config.h"
 
+// for some IPC/network system calls in asio/detail/pipe_select_interrupter.hpp 
+#include <unistd.h>
 // XXX: the ASIO header must be included before others.  See session.cc.
 #include <asio.hpp>
 

But src/lib/cc/session.cc says:

// XXX: there seems to be a strange dependency between ASIO and std library
// definitions.  On some platforms if we include std headers before ASIO
// headers unexpected behaviors will happen.
// A middle term solution is to generalize our local wrapper interface
// (currently only available for the auth server), where all such portability
// issues are hidden, and to have other modules use the wrapper.
#include <unistd.h>             // for some IPC/network system calls
#include <asio.hpp>
#include <asio/error_code.hpp>
#include <asio/system_error.hpp>

Subtickets

Change History (3)

comment:1 in reply to: ↑ description Changed 9 years ago by jinmei

This looks okay. (unistd.h is an exception in the ordering requirement).

comment:2 Changed 9 years ago by jinmei

  • Component changed from Unclassified to xfrout
  • Milestone set to 06. 4th Incremental Release
  • Owner set to jreed
  • Status changed from new to reviewing

comment:3 Changed 9 years ago by jreed

  • Resolution set to fixed
  • Status changed from reviewing to closed

committed r2391

Note: See TracTickets for help on using tickets.