Skip to content

Commit

Permalink
helper/list: include the correct header file
Browse files Browse the repository at this point in the history
The file 'list.h', copied from FreeBSD, does not depend from any
OpenOCD specific include file, but only needs 'stddef.h' for the
type 'size_t'.

Let 'list.h' to include the correct header file, then fix the now
broken dependencies in the other files that were incorrectly
relying on 'list.h' to include 'helper/types.h'

Change-Id: Idd31b5bf607e226cac44ef41b2aa335ae4dbf519
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8173
Tested-by: jenkins
  • Loading branch information
borneoa committed Mar 24, 2024
1 parent a213afa commit c02cf94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/helper/binarybuffer.h
Expand Up @@ -11,7 +11,8 @@
#ifndef OPENOCD_HELPER_BINARYBUFFER_H
#define OPENOCD_HELPER_BINARYBUFFER_H

#include "list.h"
#include <helper/list.h>
#include <helper/types.h>

/** @file
* Support functions to access arbitrary bits in a byte array
Expand Down
2 changes: 1 addition & 1 deletion src/helper/list.h
Expand Up @@ -35,7 +35,7 @@

/* begin OpenOCD changes */

#include <helper/types.h>
#include <stddef.h>

struct list_head {
struct list_head *next;
Expand Down
1 change: 1 addition & 0 deletions src/target/target.h
Expand Up @@ -23,6 +23,7 @@
#include <helper/list.h>
#include "helper/replacements.h"
#include "helper/system.h"
#include <helper/types.h>
#include <jim.h>

struct reg;
Expand Down

0 comments on commit c02cf94

Please sign in to comment.