Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
43d6f6b1
Commit
43d6f6b1
authored
Jul 01, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile with IRIX gcc-4.7
Patch from Klaus Ziegler
parent
2f7839fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
examples/libevent-client.c
examples/libevent-client.c
+13
-0
examples/libevent-server.c
examples/libevent-server.c
+13
-1
src/nghttpd.cc
src/nghttpd.cc
+8
-0
No files found.
examples/libevent-client.c
View file @
43d6f6b1
...
...
@@ -22,6 +22,17 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef __sgi
#include <string.h>
#define errx(exitcode, format, args...) \
{ \
warnx(format, ##args); \
exit(exitcode); \
}
#define warnx(format, args...) fprintf(stderr, format "\n", ##args)
char
*
strndup
(
const
char
*
s
,
size_t
size
);
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/* HAVE_CONFIG_H */
...
...
@@ -37,7 +48,9 @@
#include <netinet/in.h>
#endif
/* HAVE_NETINET_IN_H */
#include <netinet/tcp.h>
#ifndef __sgi
#include <err.h>
#endif
#include <signal.h>
#include <openssl/ssl.h>
...
...
examples/libevent-server.c
View file @
43d6f6b1
...
...
@@ -22,6 +22,16 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef __sgi
#define errx(exitcode, format, args...) \
{ \
warnx(format, ##args); \
exit(exitcode); \
}
#define warn(format, args...) warnx(format ": %s", ##args, strerror(errno))
#define warnx(format, args...) fprintf(stderr, format "\n", ##args)
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/* HAVE_CONFIG_H */
...
...
@@ -46,7 +56,9 @@
#include <netinet/in.h>
#endif
/* HAVE_NETINET_IN_H */
#include <netinet/tcp.h>
#ifndef __sgi
#include <err.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
...
...
@@ -672,7 +684,7 @@ static void start_listen(struct event_base *evbase, const char *service,
rv
=
getaddrinfo
(
NULL
,
service
,
&
hints
,
&
res
);
if
(
rv
!=
0
)
{
errx
(
1
,
NULL
);
errx
(
1
,
"Could not resolve server address"
);
}
for
(
rp
=
res
;
rp
;
rp
=
rp
->
ai_next
)
{
struct
evconnlistener
*
listener
;
...
...
src/nghttpd.cc
View file @
43d6f6b1
...
...
@@ -24,6 +24,10 @@
*/
#include "nghttp2_config.h"
#ifdef __sgi
#define daemon _daemonize
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif // HAVE_UNISTD_H
...
...
@@ -352,7 +356,11 @@ int main(int argc, char **argv) {
std
::
cerr
<<
"-d option must be specified when -D is used."
<<
std
::
endl
;
exit
(
EXIT_FAILURE
);
}
#ifdef __sgi
if
(
daemon
(
0
,
0
,
0
,
0
)
==
-
1
)
{
#else
if
(
daemon
(
0
,
0
)
==
-
1
)
{
#endif
perror
(
"daemon"
);
exit
(
EXIT_FAILURE
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment