Skip to content

Commit

Permalink
Merge branch 'master' into refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
akashrawal committed Sep 12, 2017
2 parents 02b99a7 + d23fa2b commit 5b20490
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
8 changes: 6 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,19 @@ MinGW64:
- export CPP=$PREFIX-cpp
- export RANLIB=$PREFIX-ranlib
- export PATH="/usr/$PREFIX/bin:$PATH"
- export INSTALLDIR="/usr/$PREFIX"
- export PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig
- export CPPFLAGS="-I$INSTALLDIR/include"
- export LDFLAGS="-L$INSTALLDIR/lib"
- export CFLAGS="-O2 -Wall -Wno-format"
# Install Libmicrohttpd from source
- ( cd /builds/common/libmicrohttpd
&& ./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --prefix=/usr/$PREFIX --disable-doc --disable-examples --enable-shared --enable-static
&& ./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --prefix=$INSTALLDIR --disable-doc --disable-examples --enable-shared --enable-static
&& make -j$(nproc)
&& make install )
- ./bootstrap
- export CXX=$PREFIX-g++
- export WINEPATH="/usr/$PREFIX/bin;/usr/$PREFIX/lib;$PWD/libwget/.libs"
- export WINEPATH="$INSTALLDIR/bin;$INSTALLDIR/lib;$PWD/libwget/.libs"
- ./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-shared --enable-static
- make clean
- make -j$(nproc)
Expand Down
2 changes: 1 addition & 1 deletion contrib/mingw
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export RANLIB=$PREFIX-ranlib
export PATH="/usr/$PREFIX/bin:$PATH"

export INSTALLDIR="/usr/local/$PREFIX"
export PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig
export PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig:/usr/$PREFIX/lib/pkgconfig
export CPPFLAGS="-I$INSTALLDIR/include"
export LDFLAGS="-L$INSTALLDIR/lib"

Expand Down
22 changes: 1 addition & 21 deletions tests/libtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,28 +506,8 @@ static void _http_server_stop(void)

static int _http_server_start(int SERVER_MODE)
{
static char rnd[8] = "realrnd"; // fixed 'random' value
uint16_t port_num = 0;
int fd;
char rnd[8];
ssize_t len;
size_t off;

fd = open("/dev/urandom", O_RDONLY);
if (fd == -1) {
fprintf(stderr, "Failed to open `%s': %s\n", "/dev/urandom", strerror(errno));
return 1;
}
off = 0;
while (off < 8) {
len = read(fd, rnd, 8);
if (len == -1) {
fprintf(stderr, "Failed to read `%s': %s\n", "/dev/urandom", strerror(errno));
(void)close(fd);
return 1;
}
off += len;
}
(void)close(fd);

if (SERVER_MODE == HTTP_MODE) {
httpdaemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY,
Expand Down

0 comments on commit 5b20490

Please sign in to comment.