[MDEV-6800] auth_socket plugin fails to build on OpenBSD with MariaDB 10.0.14 Created: 2014-09-27  Updated: 2014-10-05  Resolved: 2014-10-05

Status: Closed
Project: MariaDB Server
Component/s: Platform OpenBSD, Plugin - unix_socket
Affects Version/s: 10.0.14
Fix Version/s: 5.5.40, 10.0.15

Type: Bug Priority: Major
Reporter: Brad Smith Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: compile, plugins
Environment:

OpenBSD 5.6


Issue Links:
Relates
relates to MDEV-6577 auth_socket.so does not build in kFre... Closed

 Description   

The auth_socket plugin as of 10.0.14 now fails to build on OpenBSD.

[1129/1310] /usr/bin/cc  -DHAVE_CONFIG_H -DHAVE_SOCKPEERCRED -DMYSQL_DYNAMIC_PLUGIN -Dauth_socket_EXPORTS -Wall -O2 -pipe   -Wall -O2 -g -DNDEBUG -DDBUG_OFF -fPIC -Iinclude -I/home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/include -I/home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/sql -Ipcre -I/home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/pcre -MMD -MT plugin/auth_socket/CMakeFiles/auth_socket.dir/auth_socket.c.o -MF plugin/auth_socket/CMakeFiles/auth_socket.dir/auth_socket.c.o.d -o plugin/auth_socket/CMakeFiles/auth_socket.dir/auth_socket.c.o   -c /home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/plugin/auth_socket/auth_socket.c
FAILED: /usr/bin/cc  -DHAVE_CONFIG_H -DHAVE_SOCKPEERCRED -DMYSQL_DYNAMIC_PLUGIN -Dauth_socket_EXPORTS -Wall -O2 -pipe   -Wall -O2 -g -DNDEBUG -DDBUG_OFF -fPIC -Iinclude -I/home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/include -I/home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/sql -Ipcre -I/home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/pcre -MMD -MT plugin/auth_socket/CMakeFiles/auth_socket.dir/auth_socket.c.o -MF plugin/auth_socket/CMakeFiles/auth_socket.dir/auth_socket.c.o.d -o plugin/auth_socket/CMakeFiles/auth_socket.dir/auth_socket.c.o   -c /home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/plugin/auth_socket/auth_socket.c
/home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/plugin/auth_socket/auth_socket.c: In function 'socket_auth':
/home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/plugin/auth_socket/auth_socket.c:67: error: storage size of 'cred' isn't known
/home/ports/pobj/mariadb-10.0.14/mariadb-10.0.14/plugin/auth_socket/auth_socket.c:67: warning: unused variable 'cred'
ninja: build stopped: subcommand failed.



 Comments   
Comment by Elena Stepanova [ 2014-09-27 ]

I presume it's a result of changes made for MDEV-6577.

Comment by Brad Smith [ 2014-09-27 ]

Looking at the proposed diff in that ticket there is a good chance it does have something to do with the change there.

Comment by Brad Smith [ 2014-09-28 ]

Yes, looked at that diff and noticed the typo..

--- plugin/auth_socket/auth_socket.c.orig       Sat Sep 27 23:28:24 2014
+++ plugin/auth_socket/auth_socket.c    Sat Sep 27 23:28:38 2014
@@ -37,7 +37,7 @@
 #elif defined HAVE_SOCKPEERCRED
 #define level SOL_SOCKET
-#define ucred socketpeercred
+#define ucred sockpeercred
 
 #elif defined HAVE_XUCRED
 #include <sys/un.h>

Comment by Sergei Golubchik [ 2014-09-30 ]

Sorry for this. We have FreeBSD builders, but no OpenBSD so far

Does the plugin work with that patch of yours?

Comment by Brad Smith [ 2014-10-02 ]

Yes, with the patch the code now compiles again as it did with 10.0.13.

Generated at Thu Feb 08 07:14:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.