Skip to content

Commit

Permalink
fp-checkpassword: Solarish needs -lsocket -lnsl and a no-op LOG_PERROR.
Browse files Browse the repository at this point in the history
  • Loading branch information
schmonz committed Jun 23, 2023
1 parent 0f51d5f commit 825e88d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
5 changes: 2 additions & 3 deletions sysutils/fp-checkpassword/Makefile
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 2023/05/02 22:01:50 schmonz Exp $
# $NetBSD: Makefile,v 1.2 2023/06/23 20:30:22 schmonz Exp $

DISTNAME= ${GITHUB_PROJECT}-${GITHUB_TAG}
PKGNAME= ${GITHUB_PROJECT}-0.0.20171108
Expand All @@ -17,8 +17,7 @@ BUILD_TARGET= main

INSTALLATION_DIRS= bin share/doc/${PKGBASE}

#do-build:
# cd ${WRKSRC} && ${MAKE} main
LDFLAGS.SunOS+= -lsocket -lnsl

do-install:
${INSTALL_PROGRAM} ${WRKSRC}/main ${DESTDIR}${PREFIX}/bin/${PKGBASE}
Expand Down
4 changes: 2 additions & 2 deletions sysutils/fp-checkpassword/distinfo
@@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.1 2023/05/02 22:01:50 schmonz Exp $
$NetBSD: distinfo,v 1.2 2023/06/23 20:30:22 schmonz Exp $

BLAKE2s (fp-checkpassword-f92fc7c51bc4bd98f404cb29e843db1cd5ed623f-f92fc7c51bc4bd98f404cb29e843db1cd5ed623f.tar.gz) = a952dfea0a06dfab8f0aa038724ebfb02ab0cc60ebf6f5fadcb262b1b57ae20a
SHA512 (fp-checkpassword-f92fc7c51bc4bd98f404cb29e843db1cd5ed623f-f92fc7c51bc4bd98f404cb29e843db1cd5ed623f.tar.gz) = c52e42af3ab1f411228ee3e9e726f1e3fe9613b12ddc5b0ab90c78785bd5491595d1440af93305b8142b5aab16a8ae25ee6b68e92e4055e4d5ca820e7ff7ca0f
Size (fp-checkpassword-f92fc7c51bc4bd98f404cb29e843db1cd5ed623f-f92fc7c51bc4bd98f404cb29e843db1cd5ed623f.tar.gz) = 7152 bytes
SHA1 (patch-main.c) = 114c2d2b21de535be48b7a906520d1e6a59d4376
SHA1 (patch-main.c) = e4da53382292252d23a96113d6baa603f9893525
15 changes: 13 additions & 2 deletions sysutils/fp-checkpassword/patches/patch-main.c
@@ -1,6 +1,7 @@
$NetBSD: patch-main.c,v 1.1 2023/05/02 22:01:50 schmonz Exp $
$NetBSD: patch-main.c,v 1.2 2023/06/23 20:30:22 schmonz Exp $

Avoid clearenv(), not available on all platforms.
Provide no-op definition of LOG_PERROR for Solarish.

--- main.c.orig 2017-11-08 07:08:02.000000000 +0000
+++ main.c
Expand All @@ -13,7 +14,17 @@ Avoid clearenv(), not available on all platforms.
int create_socket() {
int sock;
struct sockaddr_in dest;
@@ -146,7 +148,7 @@ int main(int argc, char** argv) {
@@ -99,6 +101,9 @@ void timeout(int signum) {
int main(int argc, char** argv) {
char *user, *passwd, *remoteIP;

+#ifndef LOG_PERROR
+#define LOG_PERROR 0x0
+#endif
openlog(NULL, LOG_NDELAY | LOG_PERROR, 0);

// Give ourselves 8 seconds
@@ -146,7 +151,7 @@ int main(int argc, char** argv) {
trimNewline(result);

if (strcmp("success", result) == 0) {
Expand Down

0 comments on commit 825e88d

Please sign in to comment.