From patchwork Thu May 11 00:22:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: psykose X-Patchwork-Id: 684614 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D45B6C7EE26 for ; Thu, 11 May 2023 00:30:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236284AbjEKAaj (ORCPT ); Wed, 10 May 2023 20:30:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235579AbjEKAah (ORCPT ); Wed, 10 May 2023 20:30:37 -0400 Received: from out-56.mta1.migadu.com (out-56.mta1.migadu.com [95.215.58.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 055381BE9 for ; Wed, 10 May 2023 17:30:34 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ayaya.dev; s=key1; t=1683764592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/8sy2kY4/g0x4D4nPXyzPG63+I6YAM4Ar+nfcmTS1KE=; b=vePx4ftw3B+0fBQHK+5V44pKQMdWEgPVHfKL+GIq9VCWZAfRbBp+OX25DgwCHkYL0q2TfW KWfKwISzZ+UqncYlDFbG+sGwtbD+q4ERvuUSIT8JB0AFeadR/WmSv90ZK+w2GLOBwnUeyf DsDrVp//VU64XPnvxFh5V/Kldx9BvF8= From: psykose To: linux-bluetooth@vger.kernel.org Cc: alice@ayaya.dev Subject: [PATCH BlueZ 1/3] build: set _FILE_OFFSET_BITS and _TIME_BITS to 64 universally Date: Thu, 11 May 2023 02:22:50 +0200 Message-Id: <20230511002252.30868-1-alice@ayaya.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org these are required to make glibc set off_t and time_t to 64-bit wide types on 32-bit platforms, for large-file-support and 2k38 proofing. Signed-off-by: psykose --- Makefile.am | 1 + Makefile.obexd | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 48f0cefa7..97825a720 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,6 +27,7 @@ pkginclude_HEADERS = AM_CFLAGS = $(MISC_CFLAGS) $(WARNING_CFLAGS) $(UDEV_CFLAGS) $(LIBEBOOK_CFLAGS) \ $(LIBEDATASERVER_CFLAGS) $(ell_cflags) AM_LDFLAGS = $(MISC_LDFLAGS) +AM_CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 confdir = $(sysconfdir)/bluetooth statedir = $(localstatedir)/lib/bluetooth diff --git a/Makefile.obexd b/Makefile.obexd index 5d1a4ff65..f4abbb3e5 100644 --- a/Makefile.obexd +++ b/Makefile.obexd @@ -91,7 +91,6 @@ obexd_src_obexd_LDFLAGS = $(AM_LDFLAGS) -Wl,--export-dynamic obexd_src_obexd_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) \ $(ICAL_CFLAGS) -DOBEX_PLUGIN_BUILTIN \ -DPLUGINDIR=\""$(obex_plugindir)"\" \ - -D_FILE_OFFSET_BITS=64 \ -I$(builddir)/lib -I$(builddir)/obexd/src obexd_src_obexd_CFLAGS = $(AM_CFLAGS) -fPIC From patchwork Thu May 11 00:22:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: psykose X-Patchwork-Id: 680979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DBDDC7EE22 for ; Thu, 11 May 2023 00:30:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236268AbjEKAai (ORCPT ); Wed, 10 May 2023 20:30:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230514AbjEKAag (ORCPT ); Wed, 10 May 2023 20:30:36 -0400 X-Greylist: delayed 440 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 10 May 2023 17:30:34 PDT Received: from out-3.mta1.migadu.com (out-3.mta1.migadu.com [95.215.58.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 050511B1 for ; Wed, 10 May 2023 17:30:34 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ayaya.dev; s=key1; t=1683764593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gzTvq8trq8+ayndhr/Duw6DZGZUXmqCeCaWsKHRmxEU=; b=RgROUtxZn5M+qPIuYCsAxnD0BTkWmuwAJCGefRNwIQJ4mpN5PtxfQ2Aau5IKiLrBAGWNLC e1c+nHj4eKPhF2T9C01gJ5f4ulJmRMPAl2rOG5kIuCTkZdQCNhXc4Q6hVZISiZ02JZlHhN e0a2npGaU5PGkgygqdToNWb5H+K5hs8= From: psykose To: linux-bluetooth@vger.kernel.org Cc: alice@ayaya.dev Subject: [PATCH BlueZ 2/3] client/player: use long long for off_t print Date: Thu, 11 May 2023 02:22:51 +0200 Message-Id: <20230511002252.30868-2-alice@ayaya.dev> In-Reply-To: <20230511002252.30868-1-alice@ayaya.dev> References: <20230511002252.30868-1-alice@ayaya.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org %lld is guaranteed to be a 64-bit int, which we enforce via -D_FILE_OFFSET_BITS=64. Signed-off-by: psykose --- client/player.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/player.c b/client/player.c index 7719076c8..856997319 100644 --- a/client/player.c +++ b/client/player.c @@ -3578,7 +3578,7 @@ static int transport_send_seq(struct transport *transport, int fd, uint32_t num) offset = lseek(fd, 0, SEEK_CUR); - bt_shell_echo("[seq %d %d.%03ds] send: %zd/%zd bytes", + bt_shell_echo("[seq %d %d.%03ds] send: %lld/%lld bytes", transport->seq, secs, (nsecs + 500000) / 1000000, offset, transport->stat.st_size); From patchwork Thu May 11 00:22:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: psykose X-Patchwork-Id: 684615 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F02DC77B7D for ; Thu, 11 May 2023 00:30:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235708AbjEKAah (ORCPT ); Wed, 10 May 2023 20:30:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233254AbjEKAag (ORCPT ); Wed, 10 May 2023 20:30:36 -0400 Received: from out-14.mta1.migadu.com (out-14.mta1.migadu.com [95.215.58.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0540E10DD for ; Wed, 10 May 2023 17:30:34 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ayaya.dev; s=key1; t=1683764594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=02JKLSHG1vLTKTxUUXs3wGXxxpnoDhEqlqorGsnIBik=; b=KDzLr76UwfQSVneItCVn9XmpqwXrFeJPvMW+KJM7R18+4VMM3HZt7FOXhPlDAs6hAzxLrj 1AbVSyGtQGX3nZv2NxWA9dMKyjqlObdT4yUqdMXdb4ssEgrX9DbljxVlmAGbgrpelM88vx fJLiCaQcdHEh9+fUy1VmoZ34uAKqKBk= From: psykose To: linux-bluetooth@vger.kernel.org Cc: alice@ayaya.dev Subject: [PATCH BlueZ 3/3] tools/parser: use long long for time_t print Date: Thu, 11 May 2023 02:22:52 +0200 Message-Id: <20230511002252.30868-3-alice@ayaya.dev> In-Reply-To: <20230511002252.30868-1-alice@ayaya.dev> References: <20230511002252.30868-1-alice@ayaya.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org %lld is guarantted to be a 64-bit int, which we enforce via -D_TIME_BITS=64. Signed-off-by: psykose --- tools/parser/parser.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/parser/parser.h b/tools/parser/parser.h index 5f65f1689..1eda4f290 100644 --- a/tools/parser/parser.h +++ b/tools/parser/parser.h @@ -120,11 +120,11 @@ static inline void p_indent(int level, struct frame *f) struct tm tm; time_t t = f->ts.tv_sec; localtime_r(&t, &tm); - printf("%04d-%02d-%02d %02d:%02d:%02d.%06lu ", + printf("%04d-%02d-%02d %02d:%02d:%02d.%06llu ", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, f->ts.tv_usec); } else - printf("%8lu.%06lu ", f->ts.tv_sec, f->ts.tv_usec); + printf("%8lu.%06llu ", f->ts.tv_sec, f->ts.tv_usec); } printf("%c ", (f->in ? '>' : '<')); parser.state = 1;