Patchwork bitmanipulation: add missing include of string.h

login
register
mail settings
Submitter via Mercurial-devel
Date June 2, 2017, 5:34 p.m.
Message ID <adcedfacf15920a7ac4b.1496424866@martinvonz.svl.corp.google.com>
Download mbox | patch
Permalink /patch/21139/
State Accepted
Headers show

Comments

via Mercurial-devel - June 2, 2017, 5:34 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1496424759 25200
#      Fri Jun 02 10:32:39 2017 -0700
# Node ID adcedfacf15920a7ac4b5c2b2ab57f65857b8340
# Parent  7fcddf79634350fec32d8ed87242db6d773588d5
bitmanipulation: add missing include of string.h

That's where memcpy() is declared.
Sean Farley - June 2, 2017, 5:48 p.m.
Martin von Zweigbergk via Mercurial-devel
<mercurial-devel@mercurial-scm.org> writes:

> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1496424759 25200
> #      Fri Jun 02 10:32:39 2017 -0700
> # Node ID adcedfacf15920a7ac4b5c2b2ab57f65857b8340
> # Parent  7fcddf79634350fec32d8ed87242db6d773588d5
> bitmanipulation: add missing include of string.h
>
> That's where memcpy() is declared.

Seems fine to me, queued!

Patch

diff --git a/mercurial/bitmanipulation.h b/mercurial/bitmanipulation.h
--- a/mercurial/bitmanipulation.h
+++ b/mercurial/bitmanipulation.h
@@ -1,6 +1,8 @@ 
 #ifndef _HG_BITMANIPULATION_H_
 #define _HG_BITMANIPULATION_H_
 
+#include <string.h>
+
 #include "compat.h"
 
 static inline uint32_t getbe32(const char *c)