From 8bdb7bd3aadff4b68ad59bb482411ad88a72af64 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 29 Nov 2006 08:42:37 +0000 Subject: [PATCH] - acpid is compiled with -Werror, and gcc 4.1.1 warns about mismatching pointers. Fix it by using socklen_t type. - Modify acpid.mk to apply all available patches. Convert ACPI_SOCKETFILE adjustment from sed script to a patch. Thanks to Pavel Roskin --- package/acpid/acpid-sign-warning.patch | 11 +++++++++++ package/acpid/acpid-socket-path.patch | 11 +++++++++++ package/acpid/acpid.mk | 8 ++++---- 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 package/acpid/acpid-sign-warning.patch create mode 100644 package/acpid/acpid-socket-path.patch diff --git a/package/acpid/acpid-sign-warning.patch b/package/acpid/acpid-sign-warning.patch new file mode 100644 index 0000000000..ec66ace0d0 --- /dev/null +++ b/package/acpid/acpid-sign-warning.patch @@ -0,0 +1,11 @@ +--- acpid-1.0.4/ud_socket.c ++++ acpid-1.0.4/ud_socket.c +@@ -58,7 +58,7 @@ ud_accept(int listenfd, struct ucred *cr + while (1) { + int newsock = 0; + struct sockaddr_un cliaddr; +- int len = sizeof(struct sockaddr_un); ++ socklen_t len = sizeof(struct sockaddr_un); + + newsock = accept(listenfd, (struct sockaddr *)&cliaddr, &len); + if (newsock < 0) { diff --git a/package/acpid/acpid-socket-path.patch b/package/acpid/acpid-socket-path.patch new file mode 100644 index 0000000000..9304e7a52c --- /dev/null +++ b/package/acpid/acpid-socket-path.patch @@ -0,0 +1,11 @@ +--- acpid-1.0.4/acpid.h ++++ acpid-1.0.4/acpid.h +@@ -32,7 +32,7 @@ + #define ACPI_EVENTFILE ACPI_PROCDIR "/event" + #define ACPI_CONFDIR "/etc/acpi/events" + #define ACPI_LOGFILE "/var/log/acpid" +-#define ACPI_SOCKETFILE "/var/run/acpid.socket" ++#define ACPI_SOCKETFILE "/tmp/acpid.socket" + #define ACPI_SOCKETMODE 0666 + #define ACPI_MAX_ERRS 5 + diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk index 990f0abd95..bd0ed406df 100644 --- a/package/acpid/acpid.mk +++ b/package/acpid/acpid.mk @@ -10,12 +10,12 @@ ACPID_SITE=http://ftp.debian.org/debian/pool/main/a/acpid $(DL_DIR)/$(ACPID_SOURCE): $(WGET) -P $(DL_DIR) $(ACPID_SITE)/$(ACPID_SOURCE) -$(ACPID_DIR)/Makefile: $(DL_DIR)/$(ACPID_SOURCE) +$(ACPID_DIR)/.unpacked: $(DL_DIR)/$(ACPID_SOURCE) $(ZCAT) $(DL_DIR)/$(ACPID_SOURCE) | tar -C $(BUILD_DIR) -xvf - - $(SED) "s:ACPI_SOCKETFILE.*:ACPI_SOCKETFILE \"/tmp/acpid.socket\":" $(ACPID_DIR)/acpid.h - touch -c $(ACPID_DIR)/Makefile + toolchain/patch-kernel.sh $(ACPID_DIR) package/acpid/ acpid\*.patch + touch $(ACPID_DIR)/.unpacked -$(ACPID_DIR)/acpid: $(ACPID_DIR)/Makefile +$(ACPID_DIR)/acpid: $(ACPID_DIR)/.unpacked $(MAKE) CC=$(TARGET_CC) -C $(ACPID_DIR) $(STRIP) -s $(ACPID_DIR)/acpid $(STRIP) -s $(ACPID_DIR)/acpi_listen -- 2.30.2