Projects
Mega-LLVM:24.03
cups
_service:tar_scm:fix-httpAddrGetList-test-case-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:fix-httpAddrGetList-test-case-fail.patch of Package cups
From 079c00aac0db4d95383cf73be73e641ff26ebfc6 Mon Sep 17 00:00:00 2001 From: zhangpan <zhangpan103@h-partners.com> Date: Fri, 9 Jun 2023 11:04:18 +0800 Subject: [PATCH] fix httpAddrGetList test case fail --- cups/testhttp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cups/testhttp.c b/cups/testhttp.c index 313e4bb..f446d65 100644 --- a/cups/testhttp.c +++ b/cups/testhttp.c @@ -14,7 +14,7 @@ */ #include "cups-private.h" - +#include <unistd.h> /* * Types and structures... @@ -231,7 +231,8 @@ main(int argc, /* I - Number of command-line arguments */ char scheme[HTTP_MAX_URI], /* Scheme from URI */ hostname[HTTP_MAX_URI], /* Hostname from URI */ username[HTTP_MAX_URI], /* Username:password from URI */ - resource[HTTP_MAX_URI]; /* Resource from URI */ + resource[HTTP_MAX_URI], /* Resource from URI */ + localhostname[HTTP_MAX_URI]; /* gethostname */ int port; /* Port number from URI */ http_uri_status_t uri_status; /* Status of URI separation */ http_addrlist_t *addrlist, /* Address list */ @@ -391,7 +392,7 @@ main(int argc, /* I - Number of command-line arguments */ printf("httpAddrGetList(%s): ", hostname); - addrlist = httpAddrGetList(hostname, AF_UNSPEC, NULL); + addrlist = httpAddrGetList(gethostname(localhostname, sizeof(localhostname)), AF_UNSPEC, NULL); if (addrlist) { for (i = 0, addr = addrlist; addr; i ++, addr = addr->next) -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2