 +	sq.sq_port = pds_port;
 +	ret = connect(sock, (struct sockaddr *)&sq, sizeof(sq));
 +	if (ret < 0) {
-+		gpsd_log(&session->context->errout, LOG_ERROR,
++		GPSD_LOG(LOG_ERROR, &session->context->errout,
 +			 "QRTR open: Failed to connect socket.\n");
 +		close(sock);
 +		return -1;

From fd6199f456c7c5dcb4cb782e4af63111d22079bf Mon Sep 17 00:00:00 2001
From: Bjorn Andersson <bjorn.andersson@linaro.org>
Date: Wed, 4 Apr 2018 04:29:09 +0000
Subject: [PATCH] Introduce Qualcomm PDS service support

+
+	sock = socket(AF_QIPCRTR, SOCK_DGRAM, 0);
+	if (sock < 0) {
+	        GPSD_LOG(LOG_ERROR, &session->context->errout,
+			 "QRTR open: Unable to get QRTR socket.\n");
+		return -1;
+	}
+
+	ret = getsockname(sock, (struct sockaddr *)&sq_ctrl, &sl);
+	if (ret < 0 || sq_ctrl.sq_family != AF_QIPCRTR || sl != sizeof(sq_ctrl)) {
+	        GPSD_LOG(LOG_ERROR, &session->context->errout,
+			 "QRTR open: Unable to acquire local address.\n");
+		close(sock);
+		return -1;
