Patchwork bdiff: include compat.h in header to define ssize_t

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 13, 2017, 2:02 p.m.
Message ID <9f4a8052228523c43bbe.1507903323@mimosa>
Download mbox | patch
Permalink /patch/24819/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 13, 2017, 2:02 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1507901904 -32400
#      Fri Oct 13 22:38:24 2017 +0900
# Node ID 9f4a8052228523c43bbe9aba4b139e8161db89c7
# Parent  41045942bbaee877815dee8ba0598fc984c975b2
bdiff: include compat.h in header to define ssize_t

Before ff4c9c6263de, compat.h was included first so it happened to work.
But we shouldn't rely on the include order.
Augie Fackler - Oct. 13, 2017, 3:41 p.m.
On Fri, Oct 13, 2017 at 11:02:03PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1507901904 -32400
> #      Fri Oct 13 22:38:24 2017 +0900
> # Node ID 9f4a8052228523c43bbe9aba4b139e8161db89c7
> # Parent  41045942bbaee877815dee8ba0598fc984c975b2
> bdiff: include compat.h in header to define ssize_t

queued, thanks

Patch

diff --git a/mercurial/bdiff.h b/mercurial/bdiff.h
--- a/mercurial/bdiff.h
+++ b/mercurial/bdiff.h
@@ -1,6 +1,8 @@ 
 #ifndef _HG_BDIFF_H_
 #define _HG_BDIFF_H_
 
+#include "compat.h"
+
 struct bdiff_line {
 	int hash, n, e;
 	ssize_t len;