🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
#
# Copyright (C) 2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=cups-bjnp
PKG_VERSION:=2.0.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/cups-bjnp
PKG_HASH:=skip
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/cups-bjnp
SECTION:=net
CATEGORY:=Network
SUBMENU:=Printing
TITLE:=BJNP protocol backend for CUPS
URL:=http://sourceforge.net/projects/cups-bjnp/
DEPENDS:=cups
endef
define Package/cups-bjnp/description
CUPS backend for the canon printers using the proprietary USB over
IP BJNP protocol. This backend allows Cups to print over the network
to a Canon printer. It currently supports Cups 1.2 and Cups 1.3 and
is designed by reverse engineering.
endef
CONFIGURE_ARGS+= --with-cupsbackenddir=$(STAGING_DIR)/usr/include/cups
TARGET_CFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
$(if $(DISABLE_IPV6),-Wno-error=unused-variable)
define Package/cups-bjnp/install
$(INSTALL_DIR) $(1)/usr/lib/cups/backend
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bjnp $(1)/usr/lib/cups/backend
endef
$(eval $(call BuildPackage,cups-bjnp))
+65
View File
@@ -0,0 +1,65 @@
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -20,6 +20,7 @@ AC_DEFUN([BJNP_CHECK_IPV6],
if test "$ipv6" != "no" ; then
AC_TRY_COMPILE([
+ #include <stdlib.h>
#define INET6
#include <sys/types.h>
#include <sys/socket.h> ], [
@@ -41,6 +42,7 @@ AC_DEFUN([BJNP_CHECK_IPV6],
if test "$ipv6" != "no" ; then
AC_MSG_CHECKING([whether struct sockaddr_storage has an ss_family member])
AC_TRY_COMPILE([
+ #include <stdlib.h>
#define INET6
#include <sys/types.h>
#include <sys/socket.h> ], [
@@ -53,6 +55,7 @@ AC_DEFUN([BJNP_CHECK_IPV6],
AC_DEFINE([HAS_SS_FAMILY], 1, [Define to 1 if struct sockaddr_storage has an ss_family member])
], [
AC_TRY_COMPILE([
+ #include <stdlib.h>
#define INET6
#include <sys/types.h>
#include <sys/socket.h> ], [
--- a/bjnp-commands.c
+++ b/bjnp-commands.c
@@ -185,10 +185,8 @@ get_printer_id(http_addr_t *addr, char *
/* set IEEE1284_id */
- if (printer_id != NULL) {
strncpy(printer_id, id.udp_identity_response.id, id_len);
printer_id[id_len] = '\0';
- }
bjnp_debug(LOG_INFO, "Identity = %s\n", printer_id);
--- a/configure
+++ b/configure
@@ -4515,6 +4515,7 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+ #include <stdlib.h>
#define INET6
#include <sys/types.h>
#include <sys/socket.h>
@@ -4557,6 +4558,7 @@ $as_echo_n "checking whether struct sock
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+ #include <stdlib.h>
#define INET6
#include <sys/types.h>
#include <sys/socket.h>
@@ -4586,6 +4588,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+ #include <stdlib.h>
#define INET6
#include <sys/types.h>
#include <sys/socket.h>