Commit d9889aa4 authored by Alexander A. Maly's avatar Alexander A. Maly

Changed sigval_t to sigval for Alpine linux

Distrib with uclibc?
parent 59f10d83
Pipeline #2795 passed with stages
in 4 minutes and 18 seconds
...@@ -673,13 +673,13 @@ void Plugin::handleExternalProcessCommand(const QString &command) ...@@ -673,13 +673,13 @@ void Plugin::handleExternalProcessCommand(const QString &command)
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACX) #if defined(Q_OS_UNIX) && !defined(Q_OS_MACX)
void Plugin::handleSIGUSR1(int, siginfo_t *info, void *) void Plugin::handleSIGUSR1(int, siginfo_t *info, void *)
{ {
sigval_t val = info->si_value; int val = info->si_value.sival_int;
::usleep(1000u); ::usleep(1000u);
int sock = socket(AF_INET, SOCK_STREAM, 0); int sock = socket(AF_INET, SOCK_STREAM, 0);
sockaddr_in addr; sockaddr_in addr;
memset(&addr, 0, sizeof(addr)); memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET; addr.sin_family = AF_INET;
addr.sin_port = htons(val.sival_int); addr.sin_port = htons(val);
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
::connect(sock, (const sockaddr *) &addr, sizeof(addr)); ::connect(sock, (const sockaddr *) &addr, sizeof(addr));
QByteArray data; QByteArray data;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
static void send_port_number_to_process(pid_t pid, int port) static void send_port_number_to_process(pid_t pid, int port)
{ {
sigval_t val; sigval val;
val.sival_int = port; val.sival_int = port;
sigqueue(pid, SIGUSR1, val); sigqueue(pid, SIGUSR1, val);
} }
......
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